Author Topic: Include Category Name in Cart.php  (Read 254 times)

mediax

  • Beginner
  • *
  • Posts: 27
  • Skype Name: gigabert01
Include Category Name in Cart.php
« on: May 08, 2018, 11:27:37 am »
Hi VM,

I am running an older version of VM3 - VirtueMart 3.0.12 (Forgive this for now please.)

How do I add the Category Name of the Product - Before the product title on the cart.php page. I found an old example for VM 1.1, but nothing for more current versions of VM. Any help or guidance would be appreciated.

OLD EXAMPLE: http://forum.virtuemart.net/index.php?topic=49850.0

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3389
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Include Category Name in Cart.php
« Reply #1 on: May 08, 2018, 22:09:10 pm »
If you get item in  \components\com_virtuemart\views\cart\tmpl\default_pricelist.php ? Or check same file on your templates/YOURTEMPLATE\html\com_virtuemart\default_pricelist.php
<?php echo $prow->category_name ?>
If it not work, you have to get product from product model.

mediax

  • Beginner
  • *
  • Posts: 27
  • Skype Name: gigabert01
Re: Include Category Name in Cart.php
« Reply #2 on: May 08, 2018, 22:35:00 pm »
That worked perfectly, thank you !