Skip to main content

Thumbnails in product TABLE list do not show.

More
12 years 7 months ago #145386 by mindman
Hi Guys.
Been using Hikashop for 2 years without major issues, it's been great. :(
Yesterday updated hika to latest version on 2 sites and have the same problem in both sites.
Product images are all ok, but do not show in PRODUCT Lists that are configured to display in TABLE mode.
In DIV Mode the images work fine and around the rest of the site all products have the correct image.

I have attached a screenshot showing the affected page and the firebug output of the html.

Hope you can help.

Thanks
Ken



-- url of the page with the problem -- : www.dedicated-store.com/wp3/shop/en/spray/montanablack/400
-- HikaShop version -- : 2,3,0
-- Joomla version -- : 1.5.25
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : ANY
-- Error-message(debug-mod must be tuned on) -- : none

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

More
12 years 7 months ago #145501 by Mohamed Thelji
Hi,
1. Did you do some modifications through the "listing_table" file of the "product" view of your front-end template through the page "Hikashop" ? can you check it and test it without your modifications ?

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

More
12 years 7 months ago #145594 by mindman
Hi, there are no customizations in the list of views.

Below is copy from the file you mentioned.
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.3.0 * @author hikashop.com * @copyright (C) 2010-2014 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php if(!empty($this->rows)){ $pagination = $this->config->get('pagination','bottom'); if(in_array($pagination,array('top','both')) && $this->params->get('show_limit') && $this->pageInfo->elements->total){ $this->pagination->form = '_top'; ?> <form action="<?php echo hikashop_currentURL(); ?>" method="post" name="adminForm_<?php echo $this->params->get('main_div_name').$this->category_selected;?>_top"> <div class="hikashop_products_pagination hikashop_products_pagination_top"> <?php echo $this->pagination->getListFooter($this->params->get('limit')); ?> <span class="hikashop_results_counter"><?php echo $this->pagination->getResultsCounter(); ?></span> </div> <input type="hidden" name="filter_order_<?php echo $this->params->get('main_div_name').$this->category_selected;?>" value="<?php echo $this->pageInfo->filter->order->value; ?>" /> <input type="hidden" name="filter_order_Dir_<?php echo $this->params->get('main_div_name').$this->category_selected;?>" value="<?php echo $this->pageInfo->filter->order->dir; ?>" /> <?php echo JHTML::_( 'form.token' ); ?> </form> <?php } ?> <div class="hikashop_products"> <?php if ($this->config->get('show_quantity_field')>=2) { ?> <form action="<?php echo hikashop_completeLink('product&task=updatecart'); ?>" method="post" name="hikashop_product_form_<?php echo $this->params->get('main_div_name'); ?>" enctype="multipart/form-data"> <?php } $columns = 1; ?> <table class="hikashop_products_table adminlist table table-striped table-hover" cellpadding="1"> <thead> <tr> <?php if($this->config->get('thumbnail')){ $columns++; ?> <th class="hikashop_product_image title" align="center"> <?php echo JText::_( 'HIKA_IMAGE' );?> </th> <?php } ?> <th class="hikashop_product_name title" align="center"> <?php echo JText::_( 'PRODUCT' );?> </th> <?php if ($this->config->get('show_code')) { $columns++;?> <th class="hikashop_product_code_title" align="center"> <?php echo JText::_( 'PRODUCT_CODE' ); ?> </th> <?php } ?> <?php if($this->params->get('show_vote_product')){ ?> <th class="hikashop_product_vote title" align="center"> <?php echo JText::_('VOTE'); ?> </th> <?php } ?> <?php if($this->params->get('show_price','-1')=='-1'){ $config =& hikashop_config(); $this->params->set('show_price',$config->get('show_price')); } if($this->params->get('show_price')){ $columns++; ?> <th class="hikashop_product_price title" align="center"> <?php echo JText::_('PRICE'); ?> </th> <?php } ?> <?php if($this->params->get('add_to_cart') || $this->params->get('add_to_wishlist')){ $columns++; ?> <th class="hikashop_product_add_to_cart title" align="center"> </th> <?php } ?> <?php if(JRequest::getVar('hikashop_front_end_main',0) && JRequest::getVar('task')=='listing' && $this->params->get('show_compare')) { $columns++; ?> <th class="hikashop_product_compare title" align="center"> </th> <?php } ?> </tr> </thead> <tfoot> <tr> <td colspan="<?php echo $columns; ?>"> </td> </tr> </tfoot> <tbody> <?php foreach($this->rows as $row){ $this->row =& $row; $height = $this->params->get('image_height'); $width = $this->params->get('image_width'); if(empty($height)) $height=$this->config->get('thumbnail_y'); if(empty($width)) $width=$this->config->get('thumbnail_x'); $divWidth=$width; $divHeight=$height; $this->image->checkSize($divWidth,$divHeight,$row); $link = hikashop_completeLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias.$this->itemid.$this->category_pathway); ?> <tr> <?php if($this->config->get('thumbnail')){ ?> <td class="hikashop_product_image_row"> <div style="height:<?php echo $divHeight;?>px;text-align:center;clear:both;" class="hikashop_product_image"> <div style="position:relative;text-align:center;clear:both;width:<?php echo $divWidth;?>px;margin: auto;" class="hikashop_product_image_subdiv"> <?php if($this->params->get('link_to_product_page',1)){ ?> <a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>"> <?php } $image_options = array('default' => true,'forcesize'=>$this->config->get('image_force_size',true),'scale'=>$this->config->get('image_scale_mode','inside')); $img = $this->image->getThumbnail(@$this->row->file_path, array('width' => $this->image->main_thumbnail_x, 'height' => $this->image->main_thumbnail_y), $image_options); if($img->success) { echo '<img class="hikashop_product_listing_image" title="'.$this->escape(@$this->row->file_description).'" alt="'.$this->escape(@$this->row->file_name).'" src="'.$img->url.'"/>'; } $main_thumb_x = $this->image->main_thumbnail_x; $main_thumb_y = $this->image->main_thumbnail_y; if($this->params->get('display_badges',1)){ $this->classbadge->placeBadges($this->image, $this->row->badges, -10, 0); } $this->image->main_thumbnail_x = $main_thumb_x; $this->image->main_thumbnail_y = $main_thumb_y; if($this->params->get('link_to_product_page',1)){ ?> </a> <?php } ?> </div> </div> </td> <?php } ?> <td class="hikashop_product_name_row"> <span class="hikashop_product_name"> <?php if($this->params->get('link_to_product_page',1)){ ?> <a href="<?php echo $link;?>"> <?php } echo $this->row->product_name; if($this->params->get('link_to_product_page',1)){ ?> </a> <?php } ?> </span> <?php if(!empty($this->row->extraData->afterProductName)) { echo implode("\r\n",$this->row->extraData->afterProductName); } ?> </td> <?php if ($this->config->get('show_code')){ ?> <td class="hikashop_product_code_row"> <?php if($this->params->get('link_to_product_page',1)){ ?> <a href="<?php echo $link;?>"> <?php } echo $this->row->product_code; if($this->params->get('link_to_product_page',1)){ ?> </a> <?php } ?> </td> <?php } ?> <?php if($this->params->get('show_vote_product')){ ?> <td class="hikashop_product_vote_row"> <?php $this->row =& $row; $this->setLayout('listing_vote'); echo $this->loadTemplate(); ?> </td> <?php } ?> <?php if($this->params->get('show_price','-1')=='-1'){ $config =& hikashop_config(); $this->params->set('show_price',$config->get('show_price')); } if($this->params->get('show_price')){ ?> <td class="hikashop_product_price_row"> <?php $this->setLayout('listing_price'); echo $this->loadTemplate(); ?> </td> <?php } ?> <?php if($this->params->get('add_to_cart')){ ?> <td class="hikashop_product_add_to_cart_row"> <?php $this->setLayout('add_to_cart_listing'); echo $this->loadTemplate(); ?> </td> <?php } ?> <?php if(JRequest::getVar('hikashop_front_end_main',0) && JRequest::getVar('task')=='listing' && $this->params->get('show_compare')) { if( $this->params->get('show_compare') == 1 ) { ?> <td class="hikashop_product_compare_row"> <?php $js = 'setToCompareList('.$this->row->product_id.',\''.$this->escape($this->row->product_name).'\',this); return false;'; echo $this->cart->displayButton(JText::_('ADD_TO_COMPARE_LIST'),'compare',$this->params,$link,$js,'',0,1,'hikashop_compare_button'); ?> </td> <?php } else { ?> <td class="hikashop_product_compare_row"> <input type="checkbox" class="hikashop_compare_checkbox" id="hikashop_listing_chk_<?php echo $this->row->product_id;?>" onchange="setToCompareList(<?php echo $this->row->product_id;?>,'<?php echo $this->escape($this->row->product_name); ?>',this);"><label for="hikashop_listing_chk_<?php echo $this->row->product_id;?>"><?php echo JText::_('ADD_TO_COMPARE_LIST'); ?></label> </td> <?php } } ?> </tr> <?php } ?> </tbody> </table> <?php if ($this->config->get('show_quantity_field')>=2) { $this->ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form_'.$this->params->get('main_div_name').'\')){ return hikashopModifyQuantity(\'\',field,1,\'hikashop_product_form_'.$this->params->get('main_div_name').'\'); } return false;'; $this->row = null; $this->row->product_quantity = -1; $this->row->product_min_per_order = 0; $this->row->product_max_per_order = -1; $this->row->product_sale_start = 0; $this->row->product_sale_end = 0; $this->row->prices = array('filler'); $this->setLayout('quantity'); echo $this->loadTemplate(); if(!empty($this->ajax) && $this->config->get('redirect_url_after_add_cart','stay_if_cart')=='ask_user'){ ?> <input type="hidden" name="popup" value="1"/> <?php } ?> <input type="hidden" name="hikashop_cart_type_0" id="hikashop_cart_type_0" value="cart"/> <input type="hidden" name="add" value="1"/> <input type="hidden" name="ctrl" value="product"/> <input type="hidden" name="task" value="updatecart"/> <input type="hidden" name="return_url" value="<?php echo urlencode(base64_encode(urldecode($this->redirect_url)));?>"/> </form> <?php } if(in_array($pagination,array('bottom','both')) && $this->params->get('show_limit') && $this->pageInfo->elements->total){ $this->pagination->form = '_bottom'; ?> <form action="<?php echo hikashop_currentURL(); ?>" method="post" name="adminForm_<?php echo $this->params->get('main_div_name').$this->category_selected;?>_bottom"> <div class="hikashop_products_pagination hikashop_products_pagination_bottom"> <?php echo $this->pagination->getListFooter($this->params->get('limit')); ?> <span class="hikashop_results_counter"><?php echo $this->pagination->getResultsCounter(); ?></span> </div> <input type="hidden" name="filter_order_<?php echo $this->params->get('main_div_name').$this->category_selected;?>" value="<?php echo $this->pageInfo->filter->order->value; ?>" /> <input type="hidden" name="filter_order_Dir_<?php echo $this->params->get('main_div_name').$this->category_selected;?>" value="<?php echo $this->pageInfo->filter->order->dir; ?>" /> <?php echo JHTML::_( 'form.token' ); ?> </form> <?php } ?> </div> <?php } ?>

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

More
12 years 7 months ago #145658 by Mohamed Thelji
Ok, so can you set your product listing in TABLE mode, so that I can directly test it through your website ?

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

More
12 years 7 months ago - 12 years 7 months ago #145782 by mindman
Hi. done as requested.
www.dedicated-store.com/wp3/shop/en/spray/montanablack/400

i had to set it to div so that the customers can see the colour of the paint they are buying . :)
Last edit: 12 years 7 months ago by mindman. Reason: added info

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

More
12 years 7 months ago #145851 by Xavier
Hi,

The problem seems to come from the images and not from the views.
Are you sure that you have valid images for you products ?
In the backend, when editing one of the products present in this listing is the image displayed ?

Thanks to try to remove and put back the images, and check the folder/files permissions for the images via FTP.

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

More
12 years 7 months ago #146215 by mindman
Hi, yes the product images appear all over the back end as expected.
I have tried deleting the existing image, renameing, reupload and the problem remains.
file permissions have not changed.
is there any log file i can check that might highlight a perms problem? i.e. error log.
is the output of the html on the page correct? i only see a css reference to the product image, but no img src and img alt tags.

I am becoming really desperate and frustrated. client unhappy. :(
i wish I was a coder right now.

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

More
12 years 7 months ago #146261 by Xavier
Hi,

Thanks to give us a backend and FTP access in order to see from where the problem come

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

More
12 years 7 months ago #146455 by mindman
Hi pls check PM :=)

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

More
12 years 7 months ago #146674 by Xavier
Hi,

Could you try to delete all the thumbnails ?
By this way HikaShop will regenerate them, and hopefully use the good path.

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

More
12 years 6 months ago #147161 by mindman
Hi Xavier and the Gang.
Hope all is well.

I have deleted the thumbnail folder and hika has recreated the thumbs, but they are still not showing in table mode listing.
In div mode the thumbs are showing correctly.
Any other ideas?

Regards

Ken

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

More
12 years 6 months ago - 12 years 6 months ago #147167 by mindman
I believe this block of code is responsible for the display of the thumbs in the table_listing file (please correct me if i'm wrong)
Code:
<?php if($this->config->get('thumbnail')){ ?> <td class="hikashop_product_image_row"> <div style="height:<?php echo $divHeight;?>px;text-align:center;clear:both;" class="hikashop_product_image"> <div style="position:relative;text-align:center;clear:both;width:<?php echo $divWidth;?>px;margin: auto;" class="hikashop_product_image_subdiv"> <?php if($this->params->get('link_to_product_page',1)){ ?> <a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>"> <?php } $image_options = array('default' => true,'forcesize'=>$this->config->get('image_force_size',true),'scale'=>$this->config->get('image_scale_mode','inside')); $img = $this->image->getThumbnail(@$this->row->file_path, array('width' => $this->image->main_thumbnail_x, 'height' => $this->image->main_thumbnail_y), $image_options); if($img->success) { /*$tmpWidth = $this->config->get('thumbnail_x','100'); $tmpHeight = $this->config->get('thumbnail_y','100'); $img->url = str_replace('/0x100','/'.$tmpWidth.'x'.$tmpWidth ,$img->url);*/ echo '<img class="hikashop_product_listing_image" title="'.$this->escape(@$this->row->file_description).'" alt="'.$this->escape(@$this->row->file_name).'" src="'.$img->url.'"/>'; } $main_thumb_x = $this->image->main_thumbnail_x; $main_thumb_y = $this->image->main_thumbnail_y; if($this->params->get('display_badges',1)){ $this->classbadge->placeBadges($this->image, $this->row->badges, -10, 0); } $this->image->main_thumbnail_x = $main_thumb_x; $this->image->main_thumbnail_y = $main_thumb_y;
Is this block of code correct?
i noticed a few commented out lines, is this normal?
Is there a way to force the path to the product image itself? The images are really small anyway.
I noticed the badges display is also in this block of code, could this be the culprit?

I have run out of ideas and have a sinking feeling.

:(
Last edit: 12 years 6 months ago by mindman. Reason: insert code

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

More
12 years 6 months ago #147210 by Xavier
Hi,

Problem solved, I used back an oldest code to display the image.
I think that the newest one was not working maybe because of your Joomla version.
Probably an incompatibility.

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

More
12 years 6 months ago #147214 by mindman
Hi

Wow, wonderfull news. Thank you thanks you.

How do I replicate the fix to the other site?

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

More
12 years 6 months ago #147215 by Xavier
You just have to comment the code:
Code:
if($img->success) { echo '<img class="hikashop_product_listing_image" title="'.$this->escape(@$this->row->file_description).'" alt="'.$this->escape(@$this->row->file_name).'" src="'.$img->url.'"/>'; }
And use this code instead:
Code:
echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name),"","", $width ,$height);

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

More
12 years 6 months ago #147380 by mindman
Solved
Hi.
I just copied the file from one site to the other and all is now working ok with the thumbnails. Look how beautiful it is with all those colours. Feel free to order, we can ship anywhere.

Thanks for all the help.

Regards,

Ken

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

Time to create page: 0.362 seconds
Powered by Kunena Forum