Tabbed Products Contrib [WIP]
Ok, I've successfully got a tabbed products set up working, complete with admin backend and frontend. But I'm a bit confused on how to add this with Zen-Magic to the admin side because there is no templates folder like the frontend has.
So I had to make edits directly to "collect_info.php". How would I go about doing that properly ? Since there is no direct menu link to products.php, and it can only be reached by clicking on "add new product" or clicking on an existing product in the categories selection, it seems that I am forced to rewrite products.php to at least point to a new collect_info.php and a new update_info.php, as both of those required query changes. Also had to add a function to "functions/general.php" for "zen_get_products_description_additional", how would i do that with ZenMagic?
I've added a new field to "products_description" table called "products_description_additional" and Ive got it set to the second tab. In total, I've been trying to follow other tabbed sites and so far I've gotten:
Product Description | Additional Info & Specs | Additional Images | Customers also bought
The front end I used zen-magic on so its in my own template folder, but still since it is a modification, I am unsure how to make it work any other way besides forcing people to replace their products_display_info.php file in their template folder. Is this the proper way?
Re: Tabbed Products Contrib [WIP]
WIP frontend Demo
I plan on improving the tab design, but a lot of it is css so it should be decently easy to modify.
Admin Panel Screenshots:
http://www.tvclassico.net/admintab1.jpg
http://www.tvclassico.net/admintab2.jpg
Re: Tabbed Products Contrib [WIP]
:thumbsup:
looks great !!
question multilanguage support ? htmlarea support ?
Thanks
Re: Tabbed Products Contrib [WIP]
Quote:
Originally Posted by titangen
:thumbsup:
looks great !!
question multilanguage support ? htmlarea support ?
Thanks
Multilanguage support: YES
HTMLArea/FCK support: YES
I made sure to encapsulate the full code with each tab.
Re: Tabbed Products Contrib [WIP]
As you've already noted, there aren't any override capabilities in the Admin section. So you just have to overwrite the original files (your collect_info.php being a good example).
Don't try to replace it with a differently-named file - it just means more work and having to overwrite other files to point to them correctly.
For the extra function, you can make a separate file for it and put it in the admin/includes/functions/extra_functions/ folder rather than modifying a core function file.
Re: Tabbed Products Contrib [WIP]
Q-
Make this a new product type!!! Then you can change the collect info and anything else associated with creating a product- and NO CORE FILE CHANGES :smile:
Re: Tabbed Products Contrib [WIP]
Quote:
Originally Posted by Kim
Q-
Make this a new product type!!! Then you can change the collect info and anything else associated with creating a product- and NO CORE FILE CHANGES :smile:
AHh good point.. i was thinking about how there was a Products and Products_Document, etc.. ok great.. then i will do that.. but I dont really know how to select a document product type or another one.. ive never changed my product type before. I just click new product and it loads the default one. How do you switch?
Re: Tabbed Products Contrib [WIP]
Ohh i see now.. its a drop down next to the "Add New Product" button. Cool. Thanks Kim!
Now what do I name the extra_functions file?
The core function is in general.php. Does it matter what I name it? I think zen cart will just load all the functions it finds.. but im not sure.
Re: Tabbed Products Contrib [WIP]
Ok, How about the file: /admin/includes/modules/update_product.php ? I have to modify that to use the new Product Type, is there no other way to do that?
Re: Tabbed Products Contrib [WIP]
It doesn't matter what you call the new functions file...as you suspected, they all get loaded.
As for the file /admin/includes/modules/update_product.php, if you look closer at the other folders under admin/includes/modules, you'll see that the update_product.php is overridden for the product_music type by putting a modifed version in the product_music folder.