News:

Looking for documentation? Take a look on our wiki

Main Menu

How to show links to all categories of a product in the product page

Started by eu4ria, March 13, 2019, 08:34:13 AM

Previous topic - Next topic

eu4ria

Hello! In my vm 3.4.2 (php 7.1) site each product is getting into two categories. These two categories are equivalent. Category 1 - men or women and category 2 - original or copy.
How to show links to ALL categories in a product page?
Now in the product page there is a code:
<?php echo $this->category->category_name?>
This code shows only one category through which the visitor entered the page. and how to show also the second category?

GJC Web Design

on the product details template in the $this->product is an array of catids



   $this->product->categories => Array
        (
           
  • => 181
                [1] => 183
            )

    or  $this->product->categoryItem is another array containing all cat info (name, id etc)

    just loop thru and render what info u want
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation