Using description in productlist ?

  • Posts: 43
  • Thank you received: 0
11 years 6 months ago #75263

Is is possible to add the description of the product in the listing ?

I would like to use the description here:

website

Last edit: 11 years 6 months ago by Supah.

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

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #75286

Hi,

I think that you'll find your answer there :

The simplest option is to change the item box layout option of the module with the id 129 via the menu Display->Content modules to "image and description".
However, that will also change the layout of each item a bit.
If you don't want to change the layout, you can edit the file "listing_img_title" of the view "product" via the menu Display->Views and just add a line of code to display the description:
<?php echo $this->row->product_description; ?>

Hope this will help you.

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

  • Posts: 43
  • Thank you received: 0
11 years 6 months ago #75292

my display on the menu is by table, do i need to edit listing_table.php then ?

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

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #75297

Yes :).

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

  • Posts: 43
  • Thank you received: 0
11 years 6 months ago #75311

i must be doing something wrong... cause nothing happens :(

i added:
<td class="hikashop_product_code_row">
<?php echo $this->row->product_description; ?>
</td>

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

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #75315

you should use this code after these lines :

<?php foreach($this->rows as $row){

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

  • Posts: 43
  • Thank you received: 0
11 years 6 months ago #75328

are we talking about the same file ?

<?php
/**
 * @package  HikaShop for Joomla!
 * @version  2.0.0
 * @author  hikashop.com
 * @copyright  (C) 2010-2012 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->pageInfo->limit->value){ $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_price 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 }
                  echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name),"","", $width ,$height);
                  $main_thumb_x = $this->image->main_thumbnail_x;
                  $main_thumb_y = $this->image->main_thumbnail_y;
                  $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>
          </td>

          <?php if ($this->config->get('show_code')){ ?>
            <td class="hikashop_product_code_row">
              <?php
              echo $this->row->product_code;
              ?>
            </td>
[b]          <td class="hikashop_product_code_row">
            <?php
            echo $this->row->product_description;
            ?>
          </td>[/b]
          <?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">
              <a class="hikashop_compare_button" href="<?php echo $link;?>" onclick="setToCompareList(<?php echo $this->row->product_id;?>,'<?php echo $this->escape($this->row->product_name); ?>',this); return false;"><?php echo JText::_('ADD_TO_COMPARE_LIST'); ?></a>
            </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->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->pageInfo->limit->value){ $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(); ?>
        <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.

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
11 years 6 months ago #75332

You added your code inside that:
<?php if ($this->config->get('show_code')){ ?>

That means that the description will only display if you turn on the display of the product code.
Try to add it just before that.

Also, make sure that you're editing that file for your frontend template.

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

  • Posts: 43
  • Thank you received: 0
11 years 6 months ago #75391

nicolas wrote: You added your code inside that:
<?php if ($this->config->get('show_code')){ ?>

That means that the description will only display if you turn on the display of the product code.
Try to add it just before that.

Also, make sure that you're editing that file for your frontend template.


im sorry i don't get that...
i added this:
<td class="hikashop_product_code_row">
<?php echo $this->row->product_description; ?>
</td>

thats all i added to active template listing_table.php

Last edit: 11 years 6 months ago by Supah.

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

  • Posts: 43
  • Thank you received: 0
11 years 6 months ago #75402

i'm sorry !
had to read it a few times more before i got it ;)
thanks !

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

  • Posts: 21
  • Thank you received: 0
9 years 4 months ago #184460

hello,
I'm trying to do the same but there must me something wrong... :-/

do I have to edit listing_table.php or product/listing_img_title.php?

the code I´m adding is:
<td class="hikashop_product_code_row">
<?php echo $this->row->product_description; ?>
</td>

thanks :)

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
9 years 4 months ago #184464

Hi,

It depends how you configured your products listing. If you configured it to display as a table, then you want to modify listing_table.
If you configured it to display with DIVs, then it's the listing_img_title file that you want to edit.

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

  • Posts: 21
  • Thank you received: 0
9 years 4 months ago #184499

hi there,
yes, I configured it as a table... and modified product/listing_table.php but still not working... could you have a look please? :blush:

<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.2
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 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' ); ?>
                          <?php echo $this->row->product_description; ?>
						</th>
					<?php } ?>
					<?php if($this->params->get('show_vote_product')){ ?>
						<th class="hikashop_product_vote title" align="center">
							<?php echo JText::_('VOTE'); ?>
						</th>
                  
                                    <th class="hikashop_product_code_row">
<?php echo $this->row->product_description; ?>
</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 }
									echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name),"","", $width ,$height);
									$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">
							<a class="hikashop_compare_button" href="<?php echo $link;?>" onclick="setToCompareList(<?php echo $this->row->product_id;?>,'<?php echo $this->escape($this->row->product_name); ?>',this); return false;"><?php echo JText::_('ADD_TO_COMPARE_LIST'); ?></a>
						</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->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 } ?>

Last edit: 9 years 4 months ago by nicolas.

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
9 years 4 months ago #184503

Hi,

Make sure that you have the "show product code" option activated in the HikaShop configuration since you replaced the display of the product code by the display of the description.

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

  • Posts: 21
  • Thank you received: 0
9 years 4 months ago #184547

ok... i see...

as I preffer the short description appears under the title I wrote it here, but... is there any other change that I have to do or just adding this should work? Because I don´t get results yet... :(

<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.2
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 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' );?>

<?php echo $this->row->product_description; ?>

					</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 }
									echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name),"","", $width ,$height);
									$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">
							<a class="hikashop_compare_button" href="<?php echo $link;?>" onclick="setToCompareList(<?php echo $this->row->product_id;?>,'<?php echo $this->escape($this->row->product_name); ?>',this); return false;"><?php echo JText::_('ADD_TO_COMPARE_LIST'); ?></a>
						</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->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 } ?>

Last edit: 9 years 4 months ago by nicolas.

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
9 years 4 months ago #184579

You added it below the product title.
That's not possible to do that.

In that case, you want to add it before the line:

<?php if(!empty($this->row->extraData->afterProductName)) { echo implode("\r\n",$this->row->extraData->afterProductName); } ?>

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

  • Posts: 21
  • Thank you received: 0
9 years 4 months ago #184632

I can´t find that line in my product / listing_table.php O_O

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

  • Posts: 2143
  • Thank you received: 747
9 years 4 months ago #184681

It's there. Look around line 149.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: naranjacuatro

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

  • Posts: 21
  • Thank you received: 0
9 years 4 months ago #184827

at least!
now its works!! thank you very very much! ^_^

one last thing... any way to show title in bold? :P

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

  • Posts: 2143
  • Thank you received: 747
9 years 4 months ago #184829

naranjacuatro wrote: any way to show title in bold?


Sure, just add some custom CSS: www.hikashop.com/support/support/documen...the-display.html#css

For example:
.hikashop_product_name a {
  font-weight: bold;
}


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: naranjacuatro

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

Time to create page: 0.127 seconds
Powered by Kunena Forum