Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
How to add more parameter to URL view product detail.
I need add one more parameter in url of view product detail.
Anyone can help me?
You can add parameter directly after url.
<?php echo $_product->getProductUrl().'?param1=value1¶m2=value2' ?>
//Get value using,
I got it working by using the parameter '_query'. See an example below:
$link = $configurableProduct->getUrlInStore([
'_ignore_category' => false,
'_query' => ['attrColourId' => 'xxx'],
I hope it helps.
Required, but never shown