Product Listing php

  • Posts: 33
  • Thank you received: 0
10 years 3 months ago #187031

-- url of the page with the problem -- : www.joeysdiner.co.uk/order-online
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6

Hi - I am displaying a takeaway menu in table form. I have gone into product/listing_table.php file and have tried to paste in

<!-- 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 -->
below the Product title but this does not work!! I am at a complete lost as to where it needs to go, I also need the category description under the catergory heading in the same file??

I have read the documentation but it has only frustrated rather than solved anything!! Can anyone give me where the code needs to be placed(if the correct code)? Any help much appreciated.

Last edit: 10 years 3 months ago by Jerome. Reason: [code] is nice !

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

  • Posts: 12953
  • Thank you received: 1778
10 years 3 months ago #187038

Hello,
Firstly you should check that documentation : www.hikashop.com/support/documentation/1...-display.html#layout
Also, can you show me exactly what do you want to do through some screenshots for example ?
Thanks.

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

  • Posts: 33
  • Thank you received: 0
10 years 3 months ago #187122

Hi,

I am in listing_table.php but it looks nothing like the example in the documentation!!

Where can I get the product description code from to paste it into the file? And where do I paste it?
Where can I get the catergory description code from so that it shows in the product list? And where do I paste it?

I have attached how I want the listing to look like. Any help is much appreciated.

Attachments:

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

  • Posts: 83674
  • Thank you received: 13545
  • MODERATOR
10 years 3 months ago #187133

Hi,

Pasting that code you copied in your first message below the product name code of the listing_table view file is the solution as you already know.
So that means that the problem is either that you didn't place it below the product name code in the file or that you're editing the file for another template than your template and thus you don't see the change.
Please check that you're editing the file for the correct template and make sure that you placed the description after the product name display code:

<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>

The following user(s) said Thank You: ibextrex

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

  • Posts: 33
  • Thank you received: 0
10 years 3 months ago #187200

Thank you very much - I just needed pushing in the right direction.

Just one last question - where do I paste the Category description so I can see it under the Category title?
<!-- CATEGORY DESC -->
<span class="hikashop_category_desc" style="text-align:<?php echo $this->align; ?>;">
<?php
echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->category_description);
?>
</span>
<!-- EO CATEGORY DESC -->

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

  • Posts: 26226
  • Thank you received: 4035
  • MODERATOR
10 years 3 months ago #187219

Hi,

www.hikashop.com/support/support/documen...ize-the-display.html

In the view "product | listing"

	<h2><?php echo $category['category']->category_name; ?></h2>
	<div class="hikashop_products_listing">

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 33
  • Thank you received: 0
10 years 3 months ago #187272

I am using the table layout and I cannot find where to paste the code - for the category description,.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 3 months ago #187278

Hi,

As Jérome said the view to edit is "product / listing" this view is used for the listings in divs, in lists or in tables.
So it will work in your case.

The code to add is:

<p class="cat_desc"><?php echo $category['category']->category_description; ?></p>
And you have to put it between the two lines given by Jérome.

The following user(s) said Thank You: ibextrex

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

  • Posts: 33
  • Thank you received: 0
10 years 3 months ago #187381

It was the between the lines bit I needed!!

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

Time to create page: 0.100 seconds
Powered by Kunena Forum