![]() |
Anyone have a tpl for all products by category on one page?
I've almost finished building this myself quick n dirty using {php}, but there must be an easier way. Basically I want a product page that looks like this:
CATEGORY NAME 1etc., with thumbnail and buy now button for each product. It seems like it should be easy to make this from an existing page - I'm afraid that my PHP approach is too much reinventing the wheel, and that a pure smarty solution would be more efficient. |
Re: Anyone have a tpl for all products by category on one page?
I don't think that this exist in xcart by default. You need a php script to query the db for each category and products in it and assign these array values to smarty to use in a template. Using {php} inside template may do the job but it is no good with the amount of data you are trying to get and show
|
Re: Anyone have a tpl for all products by category on one page?
Quote:
Is anyone aware of a reason to avoid using {php} in .tpls OTHER THAN separation of logic and display? Just trying to understand xcart better and keep code as efficient as possible. Also - if anyone else is looking for the same functionality, let me know and I'll share the technique once it's all clean. |
Re: Anyone have a tpl for all products by category on one page?
Wouldn't a good site map generate what you want?
Just thought this may be one way? yep it would have all the other stuff but you could strip it down |
Re: Anyone have a tpl for all products by category on one page?
Quote:
I'm very interested in this functionality - how's it coming along? |
Re: Anyone have a tpl for all products by category on one page?
Found this post and it has a pretty good example of how to do this:
http://forum.x-cart.com/showthread.php?t=19730&highlight=all+products+by+c ategory+on+one+page |
All times are GMT -8. The time now is 10:45 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.