News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How to add categories on product link canoncial

Started by zenza, July 28, 2016, 15:52:42 PM

Previous topic - Next topic

zenza

Canoncial url by default refers to the most minimum category and how to make that he referred to a subcategory (i.e. to big category), i.e. instead of sitename/category/item.html, there was sitename/category/subcategory/item.html?

Jaspers

#1
As i understand if your product is asigned both to category and subcategory, and if you have a menu, which leads to the virtuemart category and subcategory at the same time - the canonnical url will choose the category menu link. So if you choose for product only subcategory - everything will work properly. But i need product to be choosen both category and subcategory.
I Suffer with this question 10 days already. There is no answer anywhere  :(

GJC Web Design

how about trying the extended query to show subcat prods if in parent

see models -> product.php from around line 367

if ($virtuemart_category_id > 0) {
         $joinCategory = TRUE;
         if(true){
            $where[] = ' `pc`.`virtuemart_category_id` = ' . $virtuemart_category_id;
         } else {
            /*GJC add subcat products*/  etc
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

Jaspers

So there is no way to add subcategory to the canonical link wuthout removing the category in products?