Image on product page above the product name

  • Posts: 2334
  • Thank you received: 403
10 years 8 months ago #123197

If you created a custom field as he said, this field should appear in the product edition page.
So you can put the link in this field and then use it and call it in your view ;)

Please Log in or Create an account to join the conversation.

  • Posts: 118
  • Thank you received: 3
10 years 8 months ago #123217

Yip, thanks for that, figured out what was meant. Once the custom field had been created, it shows right down the bottom of the Product Edition Page, this is where I put the live web address of my image. All works perfect :)

I'm starting to get the hang of this :)

Please Log in or Create an account to join the conversation.

  • Posts: 118
  • Thank you received: 3
9 years 11 months ago #158881

Hello, sorry to bring up an old thread but we have come across something unusual. We have several "Banner" custom fields that we set up and inserted them as an echo into the start of the show_default.php. Say we have 5 banners, one for each of the 5 products. We have the following code inserted:

<?php
echo '<img src="'.$this->element->document_printing_banner.'"/>';
echo '<img src="'.$this->element->plan_printing_banner.'"/>';
echo '<img src="'.$this->element->mail_merging_banner.'"/>';
echo '<img src="'.$this->element->file_preparation_banner.'"/>';
echo '<img src="'.$this->element->business_card_banner.'"/>';
/**
* @package HikaShop for Joomla!
* @version 2.2.1
* @author hikashop.com
* @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/

We are getting a little "broken link" icon showing for the other 4 banners that don't display. When I use firebug to inspect the element, it is looking for an image called "/". What am I doing wrong, or how can I modify the inserted code to not show these icons?

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 11 months ago #158933

Hi,

Are you sure that all the custom fields are filled with a valid value ? The path to the image ?

To don't display anything if the path is not filled, you can add a check like:

if($this->element->business_card_banner != ''){
    echo '<img src="'.$this->element->business_card_banner.'"/>';
}

The following user(s) said Thank You: ahcopyart

Please Log in or Create an account to join the conversation.

  • Posts: 118
  • Thank you received: 3
9 years 11 months ago #159097

PERFECT Xavier! Thanks again.

I put that code for each instance of the banner echo (with the different element names) and its perfect.

:)

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum