Re: Tabbed Products ''LITE'' version - Delimiter based
Great News!
I had another one of my "genius" moments :P and figured out how to make the tabs stuff into its own template file that can be called when used. I also took all the config stuff and made it into its own config module file. and I've also created a language file for the hard coded tabs.
Now the tpl_product_info_display.php file is nice and small once again and easier to understand when people want to make changes to the non-tabbed look like moving elements around. There are very few changes to the core template file now, only some minor logic to prevent things from showing both on tabs and under them.
The tabs themselves are called now with a 'require' function.
I am now going to be looking at putting Tell a Friend, Reviews, and Ask A Question inside their own tabs and converting this over to the music display template. Now that it is a separate file, it should be simple to merge into any template.
Stay tuned!
Re: Tabbed Products ''LITE'' version - Delimiter based
:thumbsup: :thumbsup:
Now you are really understanding the power of Zen.
Re: Tabbed Products ''LITE'' version - Delimiter based
Quote:
Originally Posted by Kim
:thumbsup: :thumbsup:
Now you are really understanding the power of Zen.
heh, slowly but surely :P
Re: Tabbed Products ''LITE'' version - Delimiter based
Well.. I'm stumped..
I can't seem to figure out how to pass all the proper variables for the product on page load, or know if it is even possible.
The Ask A Question seems to use a url to pass the values from that page to the contact form to pre-fill in the values. But I'm not sure that it is possible to know the values until after the page loads, so I don't think I can use that as a tab.
The Reviews form seems to also pass the product_id and I don't know how to pass that on page load. So it shows the review window, but it says there are no reviews when there should be.
And The Tell a friend has the same problem, plus it seems to skip the language file load. It shows a form and some "TEXT_BLAH_BLAH". Another problem there is that Tell a Friend would normally require you to login so it would defeat the purpose as the login would take you to another screen.
--------
The good news about the separate files still holds true though :) I am porting it over to the music product type now and so far it seems super easy to do. I also have the separate language file working fine. So unless someone else has some ideas on how to get the other 3 features working, I will have to leave this as is.
I will upload a new version later tomorrow most likely.
Re: Tabbed Products ''LITE'' version - Delimiter based
Ok. Here is the first release of the new "genius" version of Tabbed Product Lite :p
Some Highlights:
- Massive restructuring. All tab code is separated from the rest of the template file. This makes it much easier to merge the tabs into existing custom product templates and make new custom changes without a lot of confusing code surrounding the core code.
- Tab code is own template file now: /includes/templates/your_template/templates/tpl_tabbed_products_lite.php
- Tab config is own module file now: /includes/modules/tabbed_products_lite.php
- Original tpl_product_display_info.php now is much smaller, close to the default core size with minor modifications.
- Added language files. Now you can have different languages for your tabs.
- Ported the Product Types: Product, Product Music, and Product Free Shipping to a tabbed version and included the files. Now you can use the same tabs module and template with any of the included Product Types
- Added a tab for Media Manager/Collection for the music tab only. Code checks to ensure that only the music product type offers that as a tab
- Completely cleaned up the code and properly tabbed it all now that it is much easier to discern.
- Created easy to follow instructions for merging tab code into existing custom templates.
- Revamped the Add your Own Tab instructions.
I attempted to include Tell a friend, Ask a Question, and Reviews on their own tabs but there is some params and prerequisites for them and I'm not really sure how to do it.
Re: Tabbed Products ''LITE'' version - Delimiter based
I should also mention that by upgrading, if you haven't changed the default layout, nothing should change for you. Even though everything is in a different file, it should be transparent from a customer store view standpoint.
Plus keep in mind for those of you who finally have the past version finally happy the way you want it... it is quite easy to change it all around for this version.
As always, Im here to help :)
Re: Tabbed Products ''LITE'' version - Delimiter based
Quote:
Originally Posted by qhome
I should also mention that by upgrading, if you haven't changed the default layout, nothing should change for you. Even though everything is in a different file, it should be transparent from a customer store view standpoint.
Plus keep in mind for those of you who finally have the past version finally happy the way you want it... it is quite easy to change it all around for this version.
As always, Im here to help :)
-----------------------------------------------------------------------
QHOME,
Thank you for this is aamazing tool. I uploaded this new version to my site. It's running very vell. Specially for the the multilanguage possibility I will say : THANK YOU. GREAT JOB. Have a nive weekend.
Remzi:smile:
Re: Tabbed Products ''LITE'' version - Delimiter based
Hi qHome,
I installed new version and having following issues:
1-The model, weight (details) not showing,
2-I can't get the AaQ buttong to show up
Apparently you tried to move the details to another position (other than below the product name/price) and they aren't showing for some reason.
Re: Tabbed Products ''LITE'' version - Delimiter based
Quote:
Originally Posted by ideasgirl
Hi qHome,
I installed new version and having following issues:
1-The model, weight (details) not showing,
2-I can't get the AaQ buttong to show up
Apparently you tried to move the details to another position (other than below the product name/price) and they aren't showing for some reason.
Ya, in this version I left all my customizations out of it and used the default zencart core template. so the model/weight/stock thing is back where it was on fresh zc install. I was going to include my version as well but wasn't sure if people liked it that way so I was leaving it open for decision. I will put the other version back in the zip when I upload it to the downloads area.
Tho I realize now that if you have the add to cart button set to be on tabs, and by default, I assume that the product details is above tabs. But since I went back to the default display template, the add to cart button is a combination of Addto cart, prod details, qty discounts, and attribs. I guess its just better off if I leave my version or separate the add to cart button and product details again.
Where are you putting the AAQ link at? be sure it is outside of the <!-- Tabbed products lite modification --> tags if you are putting it near the add to cart button off tabs, be sure you have the add to cart button set to be off tabs, otherwise if you want to add it on tabs, you will have to edit the tpl_tabbed_products_lite.php file to add it into the tabbed area. Got a link?
Re: Tabbed Products ''LITE'' version - Delimiter based
Hi qhome,
really a great work, you are genial.
But one thing I not really miss, but it can make it better at all. It will be a switch (e.g. a checkbox) on the product.php in admin-area to choose if this article use tabs or not. But I think this is not to realize without doing changes to the core-code.
Also useable may be buttons on the html-editor to insert the soft-tabs.
But now, it a fine contribution and I will use it. THANK YOU.
Michael