- Posts: 223
- Thank you received: 1
add logo to product pages
- plumbingdeals
-
Topic Author
- Offline
an example of what i want to do can be seen here... product page example
i did this by adding the image to the product description, but trying to avoid adding it to over 1000 items individually.
thanks
Please Log in or Create an account to join the conversation.
You could also do it based on the category_pathway parameter of the URL, by adding some php code like that in the file "show" of the view "product" via the menu Display>Views:
if($_GET==127){
echo '<img src=" decorativeplumbingonline.com/images/hans.../productpagelogo.png " />';
}
where 127 is the id of the category.
If you're setting up your brands using the manufacturer feature, the check would be on $this->element->product_manufacturer_id instead of $_GET
Please Log in or Create an account to join the conversation.
- plumbingdeals
-
Topic Author
- Offline
- Posts: 223
- Thank you received: 1
i am trying the category method.
i assume some sort of php tag was/is needed, so i tried adding <?php at the front, and ?> at the end of the line you sent.
any ideas?
thanks
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- plumbingdeals
-
Topic Author
- Offline
- Posts: 223
- Thank you received: 1
<span id="hikashop_product_id_main" class="hikashop_product_id_main">
<input type="hidden" name="product_id" value="<?php echo $this->element->product_id; ?>" />
</span>
</div>
<div id="hikashop_product_bottom_part" class="hikashop_product_bottom_part">
<?php if($_GET==62){
echo '<img src="testsite.decorativeplumbingonline.com/images/catlogo.jpg" />';
} ?>
<div id="hikashop_product_description_main" class="hikashop_product_description_main">
<?php echo JHTML::_('content.prepare',preg_replace('#<hr *id="system-readmore" */>#i','',$this->element->product_description)); ?>
</div>
<span id="hikashop_product_url_main" class="hikashop_product_url_main">
<?php
if(!empty($this->element->product_url)){
JHTML::_('behavior.modal');
echo JText::sprintf('MANUFACTURER_URL','<a class="modal" rel="{handler: \'iframe\', size: {x: 925, y: 630}}" href="'.$this->element->product_url.'" >'.$this->element->product_url.'</a>');
} ?><br>
</span>
thanks!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- plumbingdeals
-
Topic Author
- Offline
- Posts: 223
- Thank you received: 1
would this be the syntax for using mfg instead....
<?php if($this->element->product_manufacturer_id==14){
echo '<img src=" testsite.decorativeplumbingonline.com/images/catlogo.jpg " />';
} ?>
Please Log in or Create an account to join the conversation.
Is the category_path parameter in the URL 14 ? Otherwise, it's normal that it's not displaying the image.
Please Log in or Create an account to join the conversation.
Is the category_path parameter in the URL 14 ? Otherwise, it's normal that it's not displaying the image.
Please Log in or Create an account to join the conversation.
- plumbingdeals
-
Topic Author
- Offline
- Posts: 223
- Thank you received: 1
lets start again...
can't get it to work....
on the product show.php view i have added the code....
<?php if($_GET==62){
echo '<img src=" testsite.decorativeplumbingonline.com/images/catlogo.jpg " />';
} ?>
with http:// before testsite..., where "62" is the code number for the category.
i inserted the code after...
<div id="hikashop_product_bottom_part" class="hikashop_product_bottom_part">
any ideas?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- plumbingdeals
-
Topic Author
- Offline
- Posts: 223
- Thank you received: 1
somehow we seemed to have gone completely off track here, so let start from the beginning please....
is there a way to add a logo (image) to all of the product pages for a particular brand/mfg?
an example of what i want to do can be seen here... decorativeplumbingonline.com/brushed-nic...category_pathway-127
i did this by adding the image to the product description, but trying to avoid adding it to over 1000 items individually.
the category_pathway of 127 is a sub category of the brand, which is category 62, the mfg id is 14, and i want the image on all products for category 62 (mfg 14)
thank you
Please Log in or Create an account to join the conversation.
If so, you can do like that:
<?php if($this->element->product_manufacturer_id==14){
echo '<img src="testsite.decorativeplumbingonline.com/images/catlogo.jpg" />';
} ?>
The categories information for products is not loaded on the product page so it's not easy to do. You would first have to do a mysql query to load the categories and if that category is not directly the parent category of the product it's even more complicated to do.
Please Log in or Create an account to join the conversation.
- plumbingdeals
-
Topic Author
- Offline
- Posts: 223
- Thank you received: 1
took us a while to get there, but that's the code that works!
gives me exactly what i wanted.
as usual, outstanding support!
thank you!
Please Log in or Create an account to join the conversation.