Product Images In Wish List

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
11 years 6 days ago #133148

Joomla! 2.5.14
HikaShop Business: 2.2.2

How can I add the product images in the wishlist?. Currently it's only showing the name of the product.

Thank you!!

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

  • Posts: 13201
  • Thank you received: 2322
11 years 6 days ago #133224

Hi,

The wishlist module is working like the cart module.
So you can enable the image display in the wishlist module options. :)

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

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
11 years 4 days ago #133622

Hi Xavier,

Sorry but I am referring to the wishlist page not the module. On the wishlist page is shows the name of the product but it does not show an image of the product.

I would like to show an image of the product.

Thank you!!

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

  • Posts: 13201
  • Thank you received: 2322
11 years 4 days ago #133641

Hi,

You have to edit the view "cart / showcart" via the menu Display > Views and add a column in the table.
In the body, to display the image you can use the following code:

<?php
	$width = (int)$this->config->get('thumbnail_x');
	$height = (int)$this->config->get('thumbnail_y');
	$imageHelper = hikashop_get('helper.image');
	$db = JFactory::getDBO();
	$db->setQuery('SELECT * FROM '.hikashop_table('file').' WHERE `file_ref_id` = '.(int)$cart->product_id.' ORDER BY `file_ordering`');
	$image = $db->loadObject();
	if(is_object($image))
		echo '<img src="' . $imageHelper->uploadFolder_url.'thumbnail_'.$width.'x'.$height.'/'.$image->file_path . '" alt="' . $image->file_name . '" id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" />';
?>

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

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
11 years 3 days ago #133788

Hi Xavier,

I add the code in the same column as the product name but the image is not showing.

<?php
  $width = (int)$this->config->get('thumbnail_x');
  $height = (int)$this->config->get('thumbnail_y');
  $imageHelper = hikashop_get('helper.image');
  $db = JFactory::getDBO();
  $db->setQuery('SELECT * FROM '.hikashop_table('file').' WHERE `file_ref_id` = '.(int)$cart->product_id.' ORDER BY `file_ordering`');
  $image = $db->loadObject();
  if(is_object($image))
    echo '<img src="' . $imageHelper->uploadFolder_url.'thumbnail_'.$width.'x'.$height.'/'.$image->file_path . '" alt="' . $image->file_name . '" id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" />';
?>
          <a href="<?php echo hikashop_completeLink('product&task=show&cid='.$cart->product_id.'&name='.$cart->alias.'&Itemid='.$Itemid); ?>">
                <?php
                  if(!isset($cart->bought) || !$cart->bought){
                    echo $cart->product_name;
                  }else{
                    echo JHTML::tooltip(implode('<br />',$cart->bought), JText::_('HIKA_BOUGHT_BY'), '',$cart->product_name);
                  }
                  if($this->params->get('show_code')){
                    echo ' ('.$cart->product_code.')';
                  }
                ?>
                </a>

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

  • Posts: 13201
  • Thank you received: 2322
11 years 13 hours ago #134066

Hi,

That should work, I tested it on my local version.
Are you sure that you have images for the products in the cart ?

I have added that feature on HikaShop, this will be present in the next release. So thanks to wait until the next release :)

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

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
10 years 11 months ago #134488

I have added that feature on HikaShop, this will be present in the next release. So thanks to wait until the next release :)


Sorry for the late response but I will be more than happy to wait :woohoo:

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

Time to create page: 0.048 seconds
Powered by Kunena Forum