Jump to content

Different templates for different products ?


Karlitus

Recommended Posts

Hi, I have been testing Prestashop but can not find out a solution to what I want :

Is possible use different templates for different products ?

I will try explain, for the product 1 i need show template "x", for product 2 and 3 i need show other different template, for example "y" and for products 4, 5 and 10 will need the template "z", etc ...

I would appreciate your help,

Link to comment
Share on other sites

You could edit your product.tpl file and do unique layouts like so:

{if $product->id == 1}
content here will only be shown on product ID 1
{/if}

But if you want to do +5 unique templates, I think it's going to be a bit messy.

 

For a lot of unique templates, it would be better to display a different tpl file depending on the product. If you can give us some more examples and specifications, it will be easier to solve your issue.

 

However it's normally a good idea to keep the design consistent throughout your website. You don't want to confuse your visitors and make them lose focus. Consider small CSS changes instead.

If you do CSS only changes, then the above code could be included in the header, to include product-specific CSS files. You could also insert this in the product container:

<div id="primary_block" class="clearfix product-{$product->id}">

- and then keep all the styles in your product.css

 

Hope it makes sense.. :)

Edited by Carlsen (see edit history)
  • Like 1
Link to comment
Share on other sites

You could edit your product.tpl file and do unique layouts like so:

{if $product->id == 1}
content here will only be shown on product ID 1
{/if}

But if you want to do +5 unique templates, I think it's going to be a bit messy.

 

For a lot of unique templates, it would be better to display a different tpl file depending on the product. If you can give us some more examples and specifications, it will be easier to solve your issue.

 

However it's normally a good idea to keep the design consistent throughout your website. You don't want to confuse your visitors and make them lose focus. Consider small CSS changes instead.

If you do CSS only changes, then the above code could be included in the header, to include product-specific CSS files. You could also insert this in the product container:

<div id="primary_block" class="clearfix product-{$product->id}">

- and then keep all the styles in your product.css

 

Hope it makes sense.. :)

Hi,

 

Thanks for your help, I understand the idea but it seems a bit confusing to apply.

 

I have about 100 products with different parameters and multiple variables (contact lenses) which makes each product with different options for purchase.

 

In my present site (with vp-asp) I have different html templates for each product and then on admin I select the template I want to show for each item. Is possible do something similar in Prestashop ?

 

Regards,

Link to comment
Share on other sites

Hi again Karlitus,

 

So what you mean by different templates, is that the select-boxes change according to which product is shown. Right?

 

If this is the case, I'm pretty sure you can use Prestashop's built in Attribute system:

 

 

First, go to Catalog -> Attributes and Groups, and add attribute groups for:

  • Olho
  • Quantidade(Caixas)
  • Diâmetro(Dia)
  • Curv.Base(BC)
  • Potência(Pwr)

Then add attributes to the above groups

 

Then edit/create a product, and go to the Combinations tab in the left side. It's the one below shipping.

 

You can then create the different combinations, and get multiple dropdown boxes that allows the customer to select his/her preferred contact-lens.

  • Like 1
Link to comment
Share on other sites

Hi again Karlitus,

 

So what you mean by different templates, is that the select-boxes change according to which product is shown. Right?

 

If this is the case, I'm pretty sure you can use Prestashop's built in Attribute system:

 

 

First, go to Catalog -> Attributes and Groups, and add attribute groups for:

  • Olho
  • Quantidade(Caixas)
  • Diâmetro(Dia)
  • Curv.Base(BC)
  • Potência(Pwr)

Then add attributes to the above groups

 

Then edit/create a product, and go to the Combinations tab in the left side. It's the one below shipping.

 

You can then create the different combinations, and get multiple dropdown boxes that allows the customer to select his/her preferred contact-lens.

 

Hi, Thanks for your help

 

My idea was to take advantage of the modules I have in html and include on prestashop product templates but if it is not possible I will try your suggestion.

 

Another question, is possible customize the way to display these fields on product page, similar to my site ?

 

Regards,

 

 

Link to comment
Share on other sites

I think that is possible display each product with a theme previously selected, with a module to create a new extra tab in the BO with the option to select the theme for these product, obviously you will need create previously these theme.

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