VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: borro on November 28, 2015, 13:05:12 PM

Title: What variable is the canonical url of a product stored in?
Post by: borro on November 28, 2015, 13:05:12 PM
Hello

Trying to embed OpenGraph protocol. Please tell me what php variable is the canonical url of a product stored in? I'm asking in sutiation of a productdetail view environment

Thank you.

VM 3.0.9
Title: Re: What variable is the canonical url of a product stored in?
Post by: borro on December 02, 2015, 13:52:17 PM
I've found that it stored at $this->product->canonical but it looks not humanreadable like, for example
index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=4877&virtuemart_category_id=59

What is the method to convert such value to one which is embeded in a <head> section of every product page?
Title: Re: What variable is the canonical url of a product stored in?
Post by: GJC Web Design on December 02, 2015, 16:00:06 PM
have a look in the views/view.html.php files
you will see how it is used there
Title: Re: What variable is the canonical url of a product stored in?
Post by: borro on December 03, 2015, 09:36:01 AM
Quote from: GJC Web Design on December 02, 2015, 16:00:06 PM
have a look in the views/view.html.php files
you will see how it is used there
thanks a lot!