Skip to main content

Product Description not shown in Product listing

More
12 years 8 months ago #140506 by Marsipulami
www.bodystuff.ch/danii/index.php/hikasho...for-products-listing
-- HikaShop version -- : Hika Starter 2.3.3
-- Joomla version -- : 3.2.1
-- PHP version -- : 5.3.23
-- Browser(s) name and version -- : Chrome

Hi there

I am testing the hika shop with my new page. So far i'm very happy with it but there are some problems i couldn't get right. Here is my first one :)
Is is possible to show a little product desciption in the product listing?
I've turned the switch on for the descrition but nothting is shown.

Am i doing anything wrong?

Thanks for help
Marsipulami

You have to be patient with me :P

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

More
12 years 8 months ago #140523 by Mohamed Thelji
Hi,
I think that you'll probably find your answer through this thread

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

More
12 years 8 months ago - 12 years 8 months ago #140529 by Marsipulami
Hi

Thanks for your answer
I tried the solution explained in this other thread.

But i couldn't find the code echo $this->row->product_name in the listing_table file of my template.

So i couln't put the new code after that line.
What am i doing wrong?

Is this the right file to change?
product / listing_table.php from my template (rt_lumiere)

Greets
Marsipulami

You have to be patient with me :P
Last edit: 12 years 8 months ago by Marsipulami.

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

More
12 years 8 months ago #140546 by Mohamed Thelji
Hi,
My bad the solution was this answer :
You'll have to add this code :
Code:
<td class="hikashop_product_description_row"> <?php echo $this->row->product_description; ?> </td>
after this :
Code:
<?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 } ?>
and add this code :
Code:
<th class="hikashop_product_description_title" align="center"> <?php echo JText::_( 'PRODUCT_DESCRIPTION' ); ?> </th>
after this :
Code:
<?php if ($this->config->get('show_code')) { $columns++;?> <th class="hikashop_product_code_title" align="center"> <?php echo JText::_( 'PRODUCT_CODE' ); ?> </th> <?php } ?>

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

More
12 years 8 months ago - 12 years 8 months ago #140549 by Marsipulami
Hi Mohamed

Thank you.
So far the description work.
But the problem is, that i only want the text before the mark "read more" is that possible?

The Idee is that in the product table, is only a short descrition of the product.
But in the product detail page, there will be more descrition for the linked product.

Best wishes
Marsipulami

You have to be patient with me :P
Last edit: 12 years 8 months ago by Marsipulami.

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

More
12 years 8 months ago - 12 years 8 months ago #140552 by Mohamed Thelji
Ok, so the best solution will probably to edit the code :
Code:
<td class="hikashop_product_description_row"> <?php echo $this->row->product_description; ?> </td>
By :
Code:
<td class="hikashop_product_description_row"> <?php if(strlen($this->row->product_description )> NB_CHAR) echo substr($this->row->product_description, 0, NB_CHAR); else echo $this->row->product_description; ?> </td>
Note that you'll have to replace the "NB_CHAR" word by the length of your category description.
Last edit: 12 years 8 months ago by Mohamed Thelji.

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

More
12 years 8 months ago #140557 by Marsipulami
There must be an error in your code Mohamed

Parse error: syntax error, unexpected ';' in line 144

You have to be patient with me :P

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

More
12 years 8 months ago #140558 by Marsipulami
ok found the error...was the point after nb_char)

but it doesn't cut the description with the number of char

??

You have to be patient with me :P

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

More
12 years 8 months ago #140560 by Mohamed Thelji
My bad, here is the code to use :
Code:
<td class="hikashop_product_description_row"> <?php if(strlen($this->row->product_description )> NB_CHAR) echo substr($this->row->product_description, 0, NB_CHAR); else echo $this->row->product_description; ?> </td>
The following user(s) said Thank You: Marsipulami

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

More
12 years 8 months ago - 12 years 8 months ago #140564 by Marsipulami
Damn...
Mohamed you're my man :)
Many thanks....it looks great like this.

That is a product listing, like it have to be ;)

You have to be patient with me :P
Last edit: 12 years 8 months ago by Marsipulami.
The following user(s) said Thank You: Mohamed Thelji

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

Time to create page: 0.227 seconds
Powered by Kunena Forum