Author Topic: Cannot use virtuemart function in external php  (Read 5139 times)

psm

  • Jr. Member
  • **
  • Posts: 75
Cannot use virtuemart function in external php
« on: August 05, 2013, 14:52:13 pm »
Dear all,
could you please advice me how I can use this function <?php echo mod_virtuemart_product::addtocart ($product);?> in external php file? Problem is that I want to use this function in my own code:

Code: [Select]
   <div class="show<?php echo $product_id?>">

    <tr>
    <td><?php echo $product_name?></td>
    <td class="td1"><?php echo mod_virtuemart_product::addtocart ($product);?></td>
    </tr>

   </div>

And this error is occured:

Fatal error: Class 'mod_virtuemart_product' not found in ....

Do you have any ideas please?

Thanks very much