Post by beaner » Thu Sep 29, 2011 4:01 am

Hi All,
I was hoping someone could help me out with a php loop.

My client wants all the products (5) to show up one on top of the other (full product description) when you click on any of the products. Please don't ask why. I would use category for this but the list format doesn't show all the information and the client wants all the information in the list.

Here is the link to the current product page. Basically I need to have the same thing but all products.
http://www.econoplus.ca/store/index.php ... duct_id=50

Please let me know if you can help with this. I need to deliver this asap and this is one of the last things I need to edit.

thanks In advance.

Beaner

Newbie

Posts

Joined
Wed Sep 28, 2011 5:07 am

Post by hbuchel » Thu Sep 29, 2011 4:56 am

Which version of OpenCart are you using?

If it's 1.5+, you could still use categories instead of editing the product pages. Take a look at category.php in your catalog/controller/product folder. Scroll down until you find

Code: Select all

'description' => substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100) . '..',
Change it to something like

Code: Select all

'description' => html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'),
Haven't fully tested to see if it causes any issues, but it worked for me just now.

New member

Posts

Joined
Mon Aug 30, 2010 9:41 pm

Post by beaner » Thu Sep 29, 2011 5:50 am

Thanks I'll give it a go and let you know if it works

really appreciate the response

Newbie

Posts

Joined
Wed Sep 28, 2011 5:07 am

Post by beaner » Thu Sep 29, 2011 5:56 am

Hey that worked! thanks

anyway I could also get the price box on this page
http://www.econoplus.ca/store/index.php ... ry&path=65

onto the new category list as well
http://www.econoplus.ca/store/index.php ... duct_id=50

Newbie

Posts

Joined
Wed Sep 28, 2011 5:07 am

Post by hbuchel » Sat Oct 01, 2011 1:35 am

Do you want to include the quantity input field? Adding options and the quantity input field are a little more rough.

If you just need the Add to Cart button, I would copy that from the default OpenCart template (catalog/view/theme/default/template/product/category.tpl) and rework it into your themes styles.

The Share This code is also in the default template, same folder, but on product.tpl You'll have to rework that though probably, since it will more than likely share the entire page, instead of that specific product.

New member

Posts

Joined
Mon Aug 30, 2010 9:41 pm
Who is online

Users browsing this forum: No registered users and 42 guests