- Posts: 33
- Thank you received: 0
Product Listing php
11 years 8 months ago - 11 years 8 months ago #187031
by ibextrex
Product Listing php was created by ibextrex
-- 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
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.
-- 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
Code:
<!-- 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 -->
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: 11 years 8 months ago by Jerome. Reason: [code] is nice !
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 8 months ago #187038
by Mohamed Thelji
Replied by Mohamed Thelji on topic Product Listing php
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.
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.
11 years 8 months ago #187122
by ibextrex
Replied by ibextrex on topic Product Listing php
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.
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.
Please Log in or Create an account to join the conversation.
11 years 8 months ago #187133
by nicolas
Replied by nicolas on topic Product Listing php
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:
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:
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.
11 years 8 months ago #187200
by ibextrex
Replied by ibextrex on topic Product Listing php
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 -->
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.
11 years 8 months ago #187219
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Product Listing php
Hi,
www.hikashop.com/support/support/documen...ize-the-display.html
In the view "product | listing"
Regards,
www.hikashop.com/support/support/documen...ize-the-display.html
In the view "product | listing"
Code:
<h2><?php echo $category['category']->category_name; ?></h2>
<div class="hikashop_products_listing">
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
11 years 8 months ago #187272
by ibextrex
Replied by ibextrex on topic Product Listing php
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.
11 years 8 months ago #187278
by Xavier
Replied by Xavier on topic Product Listing php
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:
And you have to put it between the two lines given by Jérome.
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:
Code:
<p class="cat_desc"><?php echo $category['category']->category_description; ?></p>
The following user(s) said Thank You: ibextrex
Please Log in or Create an account to join the conversation.
11 years 8 months ago #187381
by ibextrex
Replied by ibextrex on topic Product Listing php
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.206 seconds