Hello,
I am in public_html/catalog/view/theme/OPC070174-8/template/product/product.twig. I try to edit the product.twig file and in the URL I have https://exampletest.ro/index.php?route= ... duct_id=55. I want to use a command that if (GET['product_id'] == 55) { "do something" }. How can i do this? please help.
Many thanks
You need set product is in data in product controller like
$data['product_id']=$this->request>get['product_id'];
Then use {% if product_id==55 %}
On template
$data['product_id']=$this->request>get['product_id'];
Then use {% if product_id==55 %}
On template
Thank you. So I use {% if product_id==55 % echo '<a href="www.google.com">google</a>'} ?developer@avi wrote: ↑Wed Sep 25, 2019 1:25 amYou need set product is in data in product controller like
$data['product_id']=$this->request>get['product_id'];
Then use {% if product_id==55 %}
On template
I use ECHO then?
Who is online
Users browsing this forum: No registered users and 3 guests