Skip to main content

The product description is not showing up

10 years 8 months ago #233134 by sibylla
-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.5.9
-- Browser(s) name and version -- : chrome 48.0.2564.116 m

The product description is not showing up. It did before update - if I remember correct.
Tried to google the answer and look in forum - no luck.

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

10 years 8 months ago #233136 by nicolas
Hi,

It's works fine on our end. So all I can think of is that either there is no description in the products (please check in the backend), or that the view file displaying it has been altered (try renaming the folder templates/YOUR_TEMPLATE/html/com_hikashop/product/ and see if you get the description. If you do, then it comes from one of the override files in that folder).

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

10 years 7 months ago #234300 by kjeldbagh
Hi Nicolas,
I still have no description after renaming the folder.
By the way - I am the same person who asked the question :-) 2 sites 2 profiles.

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

10 years 7 months ago #234312 by nicolas
Hi,

Please provide a link to the product page and a screenshot of the settings of the corresponding product.

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

10 years 7 months ago #234339 by kjeldbagh
www.nor-den.no/nettbutikk/produkt/kirsebaerbrus

I tried to look over the other site to se if settings were different - but not that I could sse.

Tx for helping out.

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

10 years 7 months ago - 10 years 7 months ago #234348 by kjeldbagh
This was the code for product_show_default - with my changes. Now it is system default.
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.6.1 * @author hikashop.com * @copyright (C) 2010-2016 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php $height = $this->newSizes->height; $width = $this->newSizes->width; $link = hikashop_contentLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias.$this->itemid.$this->category_pathway,$this->row); if(!empty($this->row->extraData->top)) { echo implode("\r\n",$this->row->extraData->top); } ?> <table> <tr> <td valign="top"> <div class="hikashop_product_item_left_part"> <!-- PRODUCT IMG --> <?php if($this->config->get('thumbnail',1)){ ?> <div style="height:<?php echo $this->image->main_thumbnail_y;?>px;text-align:center;clear:both;" class="hikashop_product_image"> <div style="position:relative;text-align:center;clear:both;width:<?php echo $this->image->main_thumbnail_x;?>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> <?php } ?> <!-- EO PRODUCT IMG --> <!-- PRODUCT PRICE --> <?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')){ $this->setLayout('listing_price'); echo $this->loadTemplate(); } ?> <!-- EO PRODUCT PRICE --> <!-- PRODUCT VOTE --> <?php if($this->params->get('show_vote_product')){ $this->setLayout('listing_vote'); echo $this->loadTemplate(); } ?> <!-- EO PRODUCT VOTE --> <!-- ADD TO CART BUTTON AREA --> <?php if($this->params->get('add_to_cart') || $this->params->get('add_to_wishlist')){ $this->setLayout('add_to_cart_listing'); echo $this->loadTemplate(); } ?> <!-- EO ADD TO CART BUTTON AREA --> <!-- COMPARISON AREA --> <?php if(JRequest::getVar('hikashop_front_end_main',0) && JRequest::getVar('task')=='listing' && $this->params->get('show_compare')) { ?> <br/><?php if( $this->params->get('show_compare') == 1 ) { $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'); } else { ?> <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> <?php } } ?> <!-- EO COMPARISON AREA --> </div> </td> <td valign="top"> <div class="hikashop_product_item_right_part"> <h2> <!-- PRODUCT NAME --> <span class="hikashop_product_name"> <?php if($this->params->get('link_to_product_page',1)){ ?> <a href="<?php echo $link;?>"> <?php } ?> <?php echo $this->row->product_name; ?> <?php if($this->params->get('link_to_product_page',1)){ ?> </a> <?php } ?> </span> <!-- EO PRODUCT NAME --> <!-- PRODUCT CODE --> <span class='hikashop_product_code_list'> <?php if ($this->config->get('show_code')) { ?> <?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 } ?> <?php } ?> </span> <!-- EO PRODUCT CODE --> </h2> <?php if(!empty($this->row->extraData->afterProductName)) { echo implode("\r\n",$this->row->extraData->afterProductName); } ?> <!-- PRODUCT DESCRIPTION --> <div class="hikashop_product_desc" style="text-align:<?php echo $this->align; ?>"> <?php echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->product_description); ?> </div> <!-- EO PRODUCT DESCRIPTION --> </div> </td> </tr> </table> <?php if(!empty($this->row->extraData->bottom)) { echo implode("\r\n",$this->row->extraData->bottom); } ?>
Last edit: 10 years 7 months ago by nicolas.

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

10 years 7 months ago - 10 years 7 months ago #234360 by nicolas
Hi,

The code you provided comes from the file listing_img_desc of the view "product". Not the file "show_default".
And from what I can see, you're using the tabular layout on the product page, so the problem likely comes from the file "show_tabular" of the view "product".

PS: Please use the [ code ] [ /code ] tags when posting code so that it is more readable.
Last edit: 10 years 7 months ago by nicolas.

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

10 years 7 months ago #234417 by kjeldbagh
Hi,

I tried to switch to "show_tabular" to see if the problem was the same as for "show_default" and it was.

Here is the "show_tabular" code:
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.6.1 * @author hikashop.com * @copyright (C) 2010-2016 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php hikashop_loadJslib('jquery'); $js = ''; $params = null; $this->params->set('vote_type','product'); if(isset($this->element->main)){ $product_id = $this->element->main->product_id; }else{ $product_id = $this->element->product_id; } $this->params->set('vote_ref_id',$product_id); $this->params->set('productlayout','show_tabular'); $layout_vote_mini = hikashop_getLayout('vote', 'mini', $this->params, $js); $layout_vote_listing = hikashop_getLayout('vote', 'listing', $this->params, $js); $layout_vote_form = hikashop_getLayout('vote', 'form', $this->params, $js); $config =& hikashop_config(); $status_vote = $config->get('enable_status_vote'); $hide_specs = 1; if($this->element->product_manufacturer_id != 0 || $this->element->product_weight != 0 || $this->element->product_width != 0 || $this->element->product_height != 0 || $this->element->product_length != 0 || @$this->element->main->product_weight != 0 || @$this->element->main->product_width != 0 || @$this->element->main->product_height != 0 || @$this->element->main->product_length != 0) $hide_specs = 0; foreach ($this->fields as $fieldName => $oneExtraField) { $value = ''; if(empty($this->element->$fieldName) && !empty($this->element->main->$fieldName))$this->element->$fieldName = $this->element->main->$fieldName; if(isset($this->element->$fieldName)) $value = trim($this->element->$fieldName); if(!empty($value)){ $hide_specs = 0; break; } } ?> <div id="hikashop_product_top_part" class="hikashop_product_top_part"> <?php if(!empty($this->element->extraData->topBegin)) { echo implode("\r\n",$this->element->extraData->topBegin); } ?> <h1> <span id="hikashop_product_name_main" class="hikashop_product_name_main"> <?php if (hikashop_getCID('product_id')!=$this->element->product_id && isset ($this->element->main->product_name)) echo $this->element->main->product_name; else echo $this->element->product_name; ?> </span> <?php if ($this->config->get('show_code')) { ?> <span id="hikashop_product_code_main" class="hikashop_product_code_main"> <?php echo $this->element->product_code; ?> </span> <?php } ?> </h1> <?php if(!empty($this->element->extraData->topEnd)) { echo implode("\r\n",$this->element->extraData->topEnd); } ?> <?php $this->setLayout('show_block_social'); echo $this->loadTemplate(); ?> </div> <?php if(HIKASHOP_RESPONSIVE){ ?> <div class="<?php echo HK_GRID_ROW; ?>"> <?php } ?> <div id="hikashop_product_left_part" class="hikashop_product_left_part <?php echo HK_GRID_COL_6; ?>"> <?php if(!empty($this->element->extraData->leftBegin)) { echo implode("\r\n",$this->element->extraData->leftBegin); } $this->row = & $this->element; $this->setLayout('show_block_img'); echo $this->loadTemplate(); ?> <div id="hikashop_product_description_main_mini" class="hikashop_product_description_main_mini"> <?php if(!empty($this->element->product_description)){ $resume = substr(strip_tags(preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->element->product_description)),0,300); if (!empty($this->element->product_description) && strlen($this->element->product_description)>300) $resume .= " ...<a href='#hikashop_show_tabular_description'>".JText::_('READ_MORE')."</a>"; echo JHTML::_('content.prepare',$resume); } ?> </div> <?php if(!empty($this->element->extraData->leftEnd)) { echo implode("\r\n",$this->element->extraData->leftEnd); } ?> </div> <div id="hikashop_product_right_part" class="hikashop_product_right_part <?php echo HK_GRID_COL_6; ?>"> <?php if(!empty($this->element->extraData->rightBegin)) echo implode("\r\n",$this->element->extraData->rightBegin); ?> <span id="hikashop_product_price_main" class="hikashop_product_price_main"> <?php if ($this->params->get('show_price')) { $this->row = & $this->element; $this->setLayout('listing_price'); echo $this->loadTemplate(); } ?> </span><br /> <div id="hikashop_product_vote_mini" class="hikashop_product_vote_mini"> <?php if($this->params->get('show_vote_product') == '-1'){ $this->params->set('show_vote_product',$config->get('show_vote_product')); } if($this->params->get('show_vote_product')){ echo $layout_vote_mini; } ?> </div> <?php if($this->params->get('characteristic_display')!='list'){ $this->setLayout('show_block_characteristic'); echo $this->loadTemplate(); ?> <br /> <?php } $form = ',0'; if (!$this->config->get('ajax_add_to_cart', 1)) { $form = ',\'hikashop_product_form\''; } if (hikashop_level(1) && !empty ($this->element->options)) { ?> <div id="hikashop_product_options" class="hikashop_product_options"> <?php $this->setLayout('option'); echo $this->loadTemplate(); ?> </div> <br /> <?php $form = ',\'hikashop_product_form\''; if ($this->config->get('redirect_url_after_add_cart', 'stay_if_cart') == 'ask_user') { ?> <input type="hidden" name="popup" value="1"/> <?php } } if (!$this->params->get('catalogue') && ($this->config->get('display_add_to_cart_for_free_products') || ($this->config->get('display_add_to_wishlist_for_free_products', 1) && hikashop_level(1) && $this->params->get('add_to_wishlist') && $config->get('enable_wishlist', 1)) || !empty ($this->element->prices))) { if (!empty ($this->itemFields)) { $form = ',\'hikashop_product_form\''; if ($this->config->get('redirect_url_after_add_cart', 'stay_if_cart') == 'ask_user') { ?> <input type="hidden" name="popup" value="1"/> <?php } $this->setLayout('show_block_custom_item'); echo $this->loadTemplate(); } } $this->formName = $form; if($this->params->get('show_price')){ ?> <span id="hikashop_product_price_with_options_main" class="hikashop_product_price_with_options_main"> </span> <?php } ?> <?php $contact = $this->config->get('product_contact',0); ?> <div id="hikashop_product_contact_main" class="hikashop_product_contact_main"> <?php if (hikashop_level(1) && ($contact == 2 || ($contact == 1 && !empty ($this->element->product_contact)))) { $empty = ''; $params = new HikaParameter($empty); global $Itemid; $url_itemid=''; if(!empty($Itemid)){ $url_itemid='&Itemid='.$Itemid; } echo $this->cart->displayButton(JText :: _('CONTACT_US_FOR_INFO'), 'contact_us', $params, hikashop_completeLink('product&task=contact&cid=' . $this->element->product_id.$url_itemid), 'window.location=\'' . hikashop_completeLink('product&task=contact&cid=' . $this->element->product_id.$url_itemid) . '\';return false;'); } ?> </div> <?php if(!empty($this->element->extraData->rightMiddle)) echo implode("\r\n",$this->element->extraData->rightMiddle); ?> <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> <br /> <?php if(empty ($this->element->characteristics) || $this->params->get('characteristic_display')!='list'){ ?> <div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main"><?php $this->row = & $this->element; $this->ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\'' . $this->row->product_id . '\',field,1' . $form . ',\'cart\'); } else { return false; }'; $this->setLayout('quantity'); echo $this->loadTemplate(); ?></div> <?php } $this->setLayout('show_block_product_files'); echo $this->loadTemplate(); if(HIKASHOP_J30) { $this->setLayout('show_block_tags'); echo $this->loadTemplate(); } if(!empty($this->element->extraData->rightEnd)) echo implode("\r\n",$this->element->extraData->rightEnd); ?> </div> <?php if(HIKASHOP_RESPONSIVE){ ?> </div> <?php } ?> <input type="hidden" name="cart_type" id="type" 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> <div id="hikashop_product_bottom_part" class="hikashop_product_bottom_part show_tabular"> <div id="hikashop_tabs_div"> <ul class="hikashop_tabs_ul"> <li id="hikashop_show_tabular_description_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('PRODUCT_DESCRIPTION');?></li> <?php if($hide_specs == 0){ ?> <li id="hikashop_show_tabular_specification_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('SPECIFICATIONS');?></li> <?php } if($status_vote == "comment" || $status_vote == "two" || $status_vote == "both" ){ ?> <li id="hikashop_show_tabular_comment_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('PRODUCT_COMMENT');?></li> <li id="hikashop_show_tabular_new_comment_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('PRODUCT_NEW_COMMENT');?></li> <?php } ?> </ul> <?php if(!empty($this->element->extraData->bottomBegin)) echo implode("\r\n",$this->element->extraData->bottomBegin); ?> <div class="hikashop_tabs_content" id="hikashop_show_tabular_description"> <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)) { echo JText :: sprintf('MANUFACTURER_URL', '<a href="' . $this->element->product_url . '" target="_blank">' . $this->element->product_url . '</a>'); } ?> </span> </div> <?php if($hide_specs == 0){ ?> <div class="hikashop_tabs_content" id="hikashop_show_tabular_specification"> <?php $this->setLayout('show_block_dimensions'); echo $this->loadTemplate(); if(!empty($this->fields)){ $this->setLayout('show_block_custom_main'); echo $this->loadTemplate(); } ?> </div> <?php } if($status_vote == "comment" || $status_vote == "two" || $status_vote == "both" ){ ?> <form action="<?php echo hikashop_currentURL() ?>" method="post" name="adminForm_hikashop_comment_form" id="hikashop_comment_form"> <?php if(!empty($this->element->extraData->bottomMiddle)) echo implode("\r\n",$this->element->extraData->bottomMiddle); ?> <div class="hikashop_tabs_content" id="hikashop_show_tabular_comment"> <div id="hikashop_vote_listing" data-votetype="product" class="hikashop_product_vote_listing"> <?php echo $layout_vote_listing; ?> </div> </div> <div class="hikashop_tabs_content" id="hikashop_show_tabular_new_comment"> <div id="hikashop_vote_form" data-votetype="product" class="hikashop_product_vote_form"> <?php echo $layout_vote_form; ?> </div> </div> </form> <?php } ?> <input type="hidden" name="selected_tab" id="selected_tab" value="hikashop_show_tabular_description"/> <?php if(!empty($this->element->extraData->bottomEnd)) echo implode("\r\n",$this->element->extraData->bottomEnd); ?> </div> </div> <script type="text/javascript"> if(typeof(hkjQuery) == "undefined") window.hkjQuery = window.jQuery; window.hikashop.ready( function(){ var selectedTab = hkjQuery( "#selected_tab" ).val(); hkjQuery("#hikashop_tabs_div").children("div").css("display","none"); hkjQuery("#"+selectedTab+"_li").addClass("hikashop_tabs_li_selected"); hkjQuery("#"+selectedTab).css("display","inherit"); hkjQuery("#hikashop_tabs_div .hikashop_tabs_ul li").click(function(){ var currentLi = hkjQuery(this).attr("id"); var currentDiv = currentLi.replace("_li",""); hkjQuery("#hikashop_tabs_div").children("div").css("display","none"); hkjQuery("#hikashop_tabs_div").children("form").children("div").css("display","none"); hkjQuery("#"+currentDiv).css("display","inherit"); hkjQuery(".hikashop_tabs_li_selected" ).removeClass("hikashop_tabs_li_selected"); hkjQuery("#"+currentLi).addClass("hikashop_tabs_li_selected"); }); }); </script>

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

10 years 7 months ago #234420 by nicolas
Hi,

We're getting nowhere.
Please provide a backend access and we'll directly check your settings.
It's most probably not a problem in HikaShop but I can't tell you what it the source of the problem precisely like this.
www.hikashop.com/support/contact-us.html

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

10 years 7 months ago #234477 by nicolas
Hi,

The problem comes from the content plugin "Auto Read More". If you disable it, the description displays fine on the product page.
So there is some problem in that problem because it shouldn't remove the description text for no reason.
I would recommend contacting the developer of the extension so that they can add a fix for that behavior.
The following user(s) said Thank You: kjeldbagh

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

10 years 7 months ago #234615 by kjeldbagh
Tx alot - great work you do - did the trick.

I disabled the plugin "auto read more"

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

Time to create page: 0.081 seconds
Powered by Kunena Forum