Product Info Layout Design -- Best practice?
Currently there doesn't seem to be a good way to add custom product_info layouts to zen-cart. There is support for different product types however there is no good/easy way to change existing products to use a different Product Type, and no one wants to re-add all their products to use a different layout.
I've already made a request in the suggestions forum about making a way to modify existing products product type, which at the moment is not possible with the current edit system since the product type is one of the qualifiers for loading the proper editor.
The current work around I use is to add a Products Types field to the "Quick Updates" contrib and change it there, or manually edit the product type in the database.
Based on this, I would like to release a series of different product layouts that are compatible with current template versions, regardless of the template being used. The plan of attack would simply be to use different 'product types' as "layouts" based on the tpl_product_info_display.php file.
This way you could choose via Quick Updates a different "layout type" for your products easily and see if any different layouts that you'd rather use, without completely using a new template.
So the question is, would the ##############ized use of the Product_Types feature to be used as Layout_Styles be the best way to support this?
This may also promote more contribs of other product layout designs giving people a choice of multiple different looks for their products either globally or individually. The main focus of course would be to make them compatible with current version templates that already exist.
Some cons to this come from the way zen-cart uses product types now, as you would have to have custom "document" and "music" versions of certain layouts.
Thoughts?
Re: Product Info Layout Design -- Best practice?
As you have seen ... some Product Types are simply different arrangements of the display and use of the fields in the two tables:
products
products_description
Other Product Types, however, have additional tables ...
This would be a very precarious issue if you went from Product Music to Product General or Product General to Product Music ...
Whereas, changing from Product General to Product Free Shipping or Product Free Shipping to Product General results in a display change ... both are capable of having Always Free shipping ... one defaults to Always Free Shipping ON and the other OFF ... etc. etc. etc.
Re: Product Info Layout Design -- Best practice?
If you simply want to "see" how a certain product would look if it were displayed using a different template, simply specify that template in the URL, like this:
A music product:
http://www.zen-cart.net/demo/index.php?main_page=product_music_info&products_id=169
shown with a non-music template:
http://www.zen-cart.net/demo/index.php?main_page=product_info&products_id=169
This works for v1.2.x and v1.3.x. It may change in the future.
Re: Product Info Layout Design -- Best practice?
Quote:
Originally Posted by
DrByte
Thats a good tip but I was referring more to dynamic product layout changes for any individual product type to be released in a "layout pack". Some 10 or so product info layouts that could be swapped seamlessly for any product (of the product_info_display base template of course).
So this tip would be good for people to see their products with the different layouts, in fact this could have been coded to insert the tpl file name for each layout so they could be seen without actually switching.
But I will hold off as I understand there are some design changes coming in the not-so-distant future and this may not be the best way to do it at this time.
Perhaps I will leave the layouts as the single tpl_product_info_display.php that people can manually change out for now.