VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Virtuemart 1.1 Development (Archiv) => Quality & Testing VirtueMart 1.1.x => Topic started by: unleash.it on December 20, 2007, 11:55:49 AM

Title: Add to cart buttons on category pages
Post by: unleash.it on December 20, 2007, 11:55:49 AM
Hi, is it just me or is there an issue in 1.1 of having the add to cart buttons appear on the category pages. I know this works fine in the old version but on my installation (latest 1.1 nightly), the check box in the admin setup doesn't have an effect. I am building a site that needs add to cart butons on both category and detail pages.

If this is not available yet, can you please tell me around when it might be fixed? Would someone be kind enough to describe what code to use in order to manually create add to cart buttons on the category pages?

Thanks a bunch.
Title: Re: Add to cart buttons on category pages
Post by: aravot on December 20, 2007, 23:26:42 PM
Change the flypage
Title: Re: Add to cart buttons on category pages
Post by: unleash.it on December 26, 2007, 08:50:45 AM
Hmmm... I'm not sure how changing the flypage would have an effect on putting add to cart buttons on the the category pages. Can you please explain this some more? At any rate, this hasn't worked work for me.

Since I posted, I've read through both the user and developer manuals plus delved deeper in the VM code. The manuals are a work in progress, but I I now understand better how templates are supposed to work. On the "Site" tab of the Virtuemart configuration, there are "category template" and "flypage" drop downs. Please correct me if I'm wrong, but I believe these are for setting the defaults and won't have an effect on existing product categories. As a side note, I might suggest clarifying this a bit better in the tool tips. Maybe add something like, "Changing the default template only affects newly added categories". Might confuse a few less people...

So I'm able to choose my browse page (in the product category) and customize it, but I'm still not getting the add to cart buttons. There is a setting called "Show the Add-to-cart Button on the product list?" in the theme settings, this is ticked. I've tried echoing the variable $addtocart from the flypages, but this didn't work either. Any other hints?

Cheers and happy holidaze to all!
Title: Re: Add to cart buttons on category pages
Post by: gregdev on December 30, 2007, 00:45:49 AM
The add to cart button does not appear on browse pages for products that have any form of attributes. Before this change was made, users would click the add to cart button, then they would be sent to a product details page with an error-like message telling them to select attribute values. This was confusing.

Can you suggest a better way to handle this? It is still somewhat unnatural.

Greg
Title: Re: Add to cart buttons on category pages
Post by: unleash.it on December 30, 2007, 04:24:29 AM
Hi Greg, I appreciate your response. I see now how you have it set to work. Ideally, there would be a way to include attributes on the browse pages as well (this was going to be my next question).

I did some more research and found that many sites which include buy now buttons on their category pages, do take you to a detail page if they have attributes. However, there are those that have attributes on the browse pages. Here's an example of a site done with Oscommerce. I'm not sure if Oscommerce can do this out of the box, or if it was customized:

http://www.mymorningcup.com/Organic-Fair-Trade.html (http://www.mymorningcup.com/Organic-Fair-Trade.html)

I've also attached a screenshot of what I'd ideally like to achieve. This was the signed off look for my client. If I have to I should be able to convince them to go with a link to to the detail page, but it would be cool if this were possible. The less visitors have to click the more chance they'll buy something...and I would think this would be an important option to have available for those sites that need it.

Thanks and I appreciate your work (and everyone at Virtuemart). I'll be happy to try and help where I can.



[attachment cleanup by admin]