Hi, am new to opencart can please tell me how to add a link in column_left or right that only will show in an individual product page? so that link or picture only shows in the page I want.
i used
<?php if ( ($Path = '35') ) { echo 'SOMETHING'; } ?>
but not working
i used
<?php if ( ($Path = '35') ) { echo 'SOMETHING'; } ?>
but not working
Last edited by naser on Tue Mar 29, 2011 4:09 am, edited 1 time in total.
ty qahar can i know how to make it show only in one product page i did this in column_left
<?php if($this->request->get['route'] == 'product/product' ){ ?>
<td <img alt="" src="catalog/view/theme/default/image/check.gif" /></td>
<?php } ?>
but this code will show it in all product pages i want it only in page product_id=49
<?php if($this->request->get['route'] == 'product/product' ){ ?>
<td <img alt="" src="catalog/view/theme/default/image/check.gif" /></td>
<?php } ?>
but this code will show it in all product pages i want it only in page product_id=49
doesn't as follow solved it?
Code: Select all
<?php if (($this->request->get['route'] == 'product/product' ) && ($product_id ==48)){ ?>
<td> <img alt="" src="catalog/view/theme/default/image/check.gif" /></td>
<?php } ?>
Find and get many various of opencart modules, themes, mods, etc for your opencart store at http://www.openmycart.com/oc/, OPENCART SITE customization and Maintenance supports at here
ty openmycart.com
in catalog/view/theme/default/template/common/column_left
sry not solved same thing it will show in all product pages i want it only in page product_id=49
in catalog/view/theme/default/template/common/column_left
Code: Select all
<?php if (($this->request->get['route'] == 'product/product' ) && ('$product_id ==49')){ ?>
<td> <img alt="" src="catalog/view/theme/default/image/check.gif" /></td>
<?php } ?>
OK, if I am not miss understood You are looking as follow:
am I still fail to catch it?
Code: Select all
<?php if ($this->request->get['route'] == 'product/product&'.$product_id.'=48' /* Your product id */){ ?>
<td> <img alt="" src="catalog/view/theme/default/image/check.gif" /></td>
<?php } ?>
Find and get many various of opencart modules, themes, mods, etc for your opencart store at http://www.openmycart.com/oc/, OPENCART SITE customization and Maintenance supports at here
big thx to Khalid H.S he solved it and now it's working great,
thank you openmycart and qahar for ur help. and please if u can check the code will be nice
here how
in catalog\view\theme\default\template\common\column_left.tpl
add this code
in catalog\controller\common\column_left.php
look for
under it put this code
product_id ==49 you can change it to any page u want.
thank you openmycart and qahar for ur help. and please if u can check the code will be nice
here how
in catalog\view\theme\default\template\common\column_left.tpl
add this code
Code: Select all
<?php if ($product_id ==49) { ?>
<td><img alt="" src="catalog/view/theme/default/image/check.gif" /></td>
<?php } ?>
look for
Code: Select all
$this->data['modules'] = $module_data;
Code: Select all
if (isset($this->request->get['product_id'])) {
$this->data['product_id'] = $this->request->get['product_id'];
} else {
$this->data['product_id'] = 0;
}
If you wanted this for multiple product pages can you just seperate the IDs with commas? Ie 49,50,51
Thank you
Thank you
Discount Golf Clubs and Golf Equipment - Powered by Opencart
Who is online
Users browsing this forum: No registered users and 105 guests