- Posts: 640
- Thank you received: 16
Show Brand Logo in Product View
- PeterChain
-
Topic Author
- Offline
Less
More
13 years 6 months ago #96204
by PeterChain
Show Brand Logo in Product View was created by PeterChain
Please Log in or Create an account to join the conversation.
13 years 6 months ago #96299
by Xavier
Replied by Xavier on topic Show Brand Logo in Product View
Hi,
You have to edit the view "product / show_block_dimensions" and at the end of the file, replace:
By:
Then replace:
By a code to display the image too. The image is in the var: "$manufacturer->file_path;"
You have to edit the view "product / show_block_dimensions" and at the end of the file, replace:
Code:
$manufacturer = $class->get($this->element->product_manufacturer_id);
Code:
$manufacturer = $class->get($this->element->product_manufacturer_id, true);
Then replace:
Code:
echo JText::_('MANUFACTURER').': '.'<a href="'.hikashop_completeLink('category&task=listing&cid='.$manufacturer->category_id.'&name='.$manufacturer->alias.'&Itemid='.$Itemid).'">'.$manufacturer->category_name.'</a>';
Please Log in or Create an account to join the conversation.
13 years 6 months ago #97187
by dyvymtvar
Replied by dyvymtvar on topic Show Brand Logo in Product View
Peter, did you do it?
Please Log in or Create an account to join the conversation.
- PeterChain
-
Topic Author
- Offline
Less
More
- Posts: 640
- Thank you received: 16
13 years 5 months ago #97738
by PeterChain
Replied by PeterChain on topic Show Brand Logo in Product View
Sorry for the lack of response!
Finally trying to do it now. Will come back with the result!
Finally trying to do it now. Will come back with the result!
Please Log in or Create an account to join the conversation.
13 years 4 months ago - 13 years 4 months ago #103005
by ax
Hello Xavier, could you show the code to display the image. thanks
Replied by ax on topic Show Brand Logo in Product View
Xavier wrote: Hi,
You have to edit the view "product / show_block_dimensions" and at the end of the file, replace:By:Code:$manufacturer = $class->get($this->element->product_manufacturer_id);Code:$manufacturer = $class->get($this->element->product_manufacturer_id, true);
Then replace:By a code to display the image too. The image is in the var: "$manufacturer->file_path;"Code:echo JText::_('MANUFACTURER').': '.'<a href="'.hikashop_completeLink('category&task=listing&cid='.$manufacturer->category_id.'&name='.$manufacturer->alias.'&Itemid='.$Itemid).'">'.$manufacturer->category_name.'</a>';
Hello Xavier, could you show the code to display the image. thanks
Last edit: 13 years 4 months ago by Jerome. Reason: setting quotes
Please Log in or Create an account to join the conversation.
13 years 4 months ago #103052
by nicolas
Replied by nicolas on topic Show Brand Logo in Product View
As Xavier said, you can use $manufacturer->file_path to display the image with the standard image display function of HikaShop:
where 120 is the width and 80 the height of the thumbnail.
Code:
echo $this->image->display($manufacturer->file_path,false,$manufacturer->file_name,'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"', '', 120, 80);
Please Log in or Create an account to join the conversation.
13 years 4 months ago #103105
by ax
Replied by ax on topic Show Brand Logo in Product View
I did it that way but it only loads the default not avaible image.
the manofacturers are linked to the images and the product to the manofacturer so it should be working.
what can be wrong?
thanks nicolas.
the manofacturers are linked to the images and the product to the manofacturer so it should be working.
what can be wrong?
thanks nicolas.
Please Log in or Create an account to join the conversation.
13 years 4 months ago - 13 years 4 months ago #103133
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Show Brand Logo in Product View
Hi,
The code display the image of the manufacturer.
I test it in a local website and it works good, just replacing the code as Xavier and Nicolas said.
Are you sure you replaced all elements like they said ?
Regards,
The code display the image of the manufacturer.
I test it in a local website and it works good, just replacing the code as Xavier and Nicolas said.
Are you sure you replaced all elements like they said ?
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Last edit: 13 years 4 months ago by Jerome.
Please Log in or Create an account to join the conversation.
- PeterChain
-
Topic Author
- Offline
Less
More
- Posts: 640
- Thank you received: 16
13 years 4 months ago #103170
by PeterChain
Replied by PeterChain on topic Show Brand Logo in Product View
Hi,
As the original generator of this thread I can say the code worked fine for me since the first iteration of the code.
As the original generator of this thread I can say the code worked fine for me since the first iteration of the code.
Please Log in or Create an account to join the conversation.
13 years 4 months ago #103176
by ax
Replied by ax on topic Show Brand Logo in Product View
I tried again and now its working, thanks!
Please Log in or Create an account to join the conversation.
Time to create page: 0.218 seconds