Jump to content

Display Product by ID


mpatzekov

Recommended Posts

I am trying to do one very simple thing.

 

In the front end of a product, let's say in product.tpl below all the information of the certain product - long description, comments, etc,  I want to display 4 products by custom choosing their ids. A NOTE: the accessories functionality is not an option because I use it for another thing. Well, the perfect scenario would be to replicate this functionality, but I don't think it will be possible.

 

So, below the product I want to show a list of 4 product with ids - 220, 105, 452, 8. All of them should have a name, price, link to the product and add to cart functionality, so I guess calling the $tpl_dir./product-list.tpl is essential.

 

I tried several scenarios but none of them worked. 

 

I would really appreciate any kind of suggestions! This should be very simple but I just can't figure it out - I always get some kind of php syntax errors or smarty template errors.

Edited by mpatzekov (see edit history)
Link to comment
Share on other sites

Same product categories is a default module which allows to display products from the same category. Otherwise you needed to duplicate this module and change the module settings so you could choose other products on your own. However it would NOT be easy as you stated, especially not if you don't have module developer knowhow.

Link to comment
Share on other sites

Sounds like a big headache. Yes, I am not a professional developer but I know this and that... and I was wondering isn't there a more easy way to show all details of product_id = 5 for example in the template? 

 

Or is there documentation how to work with product ids and how to call information about products with certain ids?

Link to comment
Share on other sites

I still do not understand the basic requirement. The product details are shown on the product page. Only one product. If you use accessories for other purposes, this might have been a wrong approach because accessories is exactely the way to assign accessories.

 

And yes, there is plenty of documentation, whatever you need: Use google if you have troubles to find.

 

V1.6

http://doc.prestashop.com/display/PS16/PrestaShop+1.6+documentation

 

V1.7

http://doc.prestashop.com/display/PS17/PrestaShop+1.7+documentation

Edited by Scully (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...