Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / drop down attributes at product listing page near add to cart button.

drop down attributes at product listing page near add to cart button.

Views: 40,812

Results 1 to 20 of 96
26 May 2008, 3:54 AM
#1
ethan_kolasinski avatar

ethan_kolasinski

New Zenner

Join Date:
May 2008
Posts:
5
Plugin Contributions:
0

drop down attributes at product listing page near add to cart button.

Hello....I've seen a few posts similar to this question, but not sure if it's been answered. I'm looking to make some of my sites pages with drop down attributes at product listing page near add to cart button.

Similar to this site here:

http://www.shiboridragonknits.com/HanahSilk-Ribbon.htm

Can anyone help me please? Is this possible in zen cart. The software used at the site referenced above is not zen cart.

Thanks!

Ethan Kolasinski
:lamo:

26 May 2008, 3:36 PM
#3
ethan_kolasinski avatar

ethan_kolasinski

New Zenner

Join Date:
May 2008
Posts:
5
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

misty:

http://zencart.net/demo/index.php?main_page=product_info&cPath=23&products_id=59
Url above shows example re your request for
dropdown attributes.. other examples also at site above.
:smile:

Thanks...but I want to know how to get an attribute drop down on the product LISTING page, not the product DESCRIPTION page like the example you gave above. I already provided a linked example of what I'm looking for, yet you list a different example. What good does an example do if you don't show me how to do it? What you showed me I already know how to do anyway...but thanks...I think.

Anyone else understand, want to help?

:frusty:

Ethan Kolasinski

16 Jun 2008, 7:38 AM
#4
vinaykant avatar

vinaykant

New Zenner

Join Date:
Dec 2007
Posts:
5
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

Hi,
I also need same type of functionality.

Have you got any solution?

Please help...

4 Sep 2008, 6:06 PM
#5
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

just wondered if anyone has figured this out? I've spent a long time looking into it with other carts too. another os cart can do it, but I dont like that system. Cant seem to find any other solutions, my preference is to stick with Zencart so would be great if we could figure this out.

4 Sep 2008, 7:32 PM
#6
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

Hi. I have been trying to hack the files to do this. I have managed to list the product attributes on the product listing page for each product. Quite chuffed with that. But I notice the form utilises the function actionMultipleAddProduct() (with no action to add attributes of course) but adding a single product uses the function actionAddProduct() which I assume will add chosen attributes.

So I wondered if someone could help with changing the "actionMultipleAddProduct" function to add in the attributes. Does anyone know what I would need to do to do this?

I think if this is possible, to add attributes using the actionMultipleAddProduct() function then maybe it will work! Or be closer to get it working anyway.

Thanks

4 Sep 2008, 9:45 PM
#7
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

I've done some quick and dirty hacking and it seems to be working OK now. So I have got the product options displaying on the product listing page as a couple of neat drop downs. I'll add the link when the site is live in a few weeks (dont want to post development url) so in meantime if anyone wants to take a look at the site PM me. The hack is quick and dirty, I was in a rush, so if anyone wants the code to improve it or something no problem.

8 Sep 2008, 11:45 AM
#8
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

Hi. Here are the files I have changed/created to get the options on product listing to work. Its v.1.3.8a, I dont know if it will work on older versions. Also, sorry if the code is not great, I dont have the time at the moment to make it into a wonderfully coded add on, all I know is it seems to work for me.

The only core file changed is the includes/classes/shopping_cart.php file. The rest are extra files and template files.

You should use something like Beyond Compare to compare the shopping_cart.php file.

So if someone wants to take this and improve it and make it into a better add on that would be great, appreciate a thanks at the top or something. Alternatively you could try it at your own risk, but seems to work for me.

29 Sep 2008, 9:18 PM
#9
eflat avatar

eflat

New Zenner

Join Date:
Aug 2008
Posts:
33
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

I just copied this over (after backing-up up, of course) and after bouncing around it a bit, it seems to be working fine. It seems like a really reasonable thing to want to do - many fewer clicks for a customer to put multiple products into the cart, and it's a much better customer experience, imho.

11 Nov 2008, 10:07 PM
#10
maureent avatar

maureent

New Zenner

Join Date:
Nov 2008
Posts:
60
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

Like a lot of other people here, I was looking for a way to show attributes on the product listing page, so when I found this mod, I did a little happy dance. Unfortunately, there appears to be a major problem with it.

By using certain settings in ADMIN>CONFIGURATION>PRODUCT LISTING (see below), I set the site up so that an Add to Cart button shows for every item on the Product Listing page, whether the items have attributes or not. This is where the problem comes in. When clicking on one of those Add to Cart buttons, the attributes do not show up in the shopping cart, regardless of whether or not the attributes change the product price. If I go to the Product Info/More Info page and click that Add to Cart button, everything is fine. The attributes show up in the cart as they should.

Now, if I change the admin settings so that instead of cart buttons appearing for every product, there are Add Selected Products to Cart buttons that appear at the top and/or bottom of the Product Listing page, then it works. Clicking on that button will add the attributes to the cart. But I don't want that since it requires that a shopper add a product by entering how many they want in the quantity box and then scroll up or down the page to find the add button.

I suppose it's possible that I need to make some other changes in my admin settings to get this to work or that there's something else interfering with it, but I don't know what it could be. Is there anyone out there who is successfully using this mod in the way that I want to use it?

For your reference, the settings I used in ADMIN>CONFIGURATION>PRODUCT LISTING to get an Add to Cart button for each product are as follows:

Display Product Add to Cart Button (0=off; 1=on; 2=on with Qty Box per Product): 2

Display Multiple Products Qty Box Status and Set Button Location: 0 (This turns on or off the Add Selected Products to Cart button that appears at the top and/or bottom of the Product Listing page, which, when on, disables individual Add to Cart buttons.)

Here’s the URL to the site. It's just a test site that I'm working on to see if I can get Zen Cart to look and work the way my client wants it to.

http://www.mdschoice.com/test_store1/

12 Nov 2008, 9:18 AM
#11
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

Hi Maureen

Thanks for letting us know. I had only the time to make it work how my client wants it (Add to Cart buttons at top and bottom), and it seems to work fine for that.

I posted this solution in the hope someone could take it over and improve it and make it work properly so it would work in your case too, but I would not have the time to do that. If you manage to figure it out, please post back here. Ideally I would love Zencart to include it (so its done properly) as it really is a great way to display and list products on stores where poeple will be choosing multiple products from a category.

10 Dec 2008, 6:16 PM
#12
maureent avatar

maureent

New Zenner

Join Date:
Nov 2008
Posts:
60
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

I thought I should give you an update. My friend was unable to fix the problem. He said the problem is that the information for the options is being added after the data has already been sent to the shopping cart, which is why the options are not being including.

Due to work and personal issues, he's unable to spend any more time on this, so I have no choice but to post a message in the Commercial Help Wanted section and see if anyone there can correct the problem and not charge too much for it.

13 Dec 2008, 10:56 PM
#13
archu avatar

archu

New Zenner

Join Date:
Sep 2008
Posts:
5
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

Hi

I Tried this option to add attributes from the product listing of addcart button on each product.Its getting the options_values_id only thing we need to get [products_options_name] and [products_options_values_name].

I have attached the changed file product_lit zip file to get attributes of each product.

I tried my level this only ADDS FIRST PRODUCT ATTRIBUTE ON SHOPPING CART.OTHER PRODUCTS ARE GETS ONLY options_values_id .

I thing there was problem on page/shoppingcart/header_php file to get matching the ids of product and attributes.

You need to adjust the select query to getting all from options_values_id.

You can also check this after adding the attachment and print product array on shopping cart page

if anyone try to answer and add contribution to this

Thanks in advance

Archunan/india

15 Dec 2008, 9:38 PM
#14
maureent avatar

maureent

New Zenner

Join Date:
Nov 2008
Posts:
60
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

Archu, I tried your modification, and it completely messed up the product listing. No products were showing at all. Your instructions were a little vague. Is there something else that needs to be done besides changing the product_listing.php file? You mentioned something about the page/shoppingcart/header_php file and adjusting the select query. If there are other changes that must be made, please explain them in detail. Thanks.

26 Dec 2008, 6:56 PM
#15
pablo1719 avatar

pablo1719

New Zenner

Join Date:
Nov 2008
Posts:
33
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

Maureen,

Did you figure it out? On your test page it appears that you have. Can you share the answer as I'm trying to do a similar project.

Thanks
Paul

29 Dec 2008, 11:16 PM
#16
pablo1719 avatar

pablo1719

New Zenner

Join Date:
Nov 2008
Posts:
33
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

Ok got it to work but now I am wondering if anyone knows how to make the price update dynamically with attributes.

For anyone who is new...in order to use this just replace the file in your directory ROOT/includes/modules/YOUR_TEMPLATE/product_listing.php

Paul

25 Feb 2009, 3:03 AM
#17
leialoha avatar

leialoha

New Zenner

Join Date:
Feb 2009
Location:
Kilauea, Kauai - Hawaii
Posts:
21
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

Aloha!!!

Someone got further with it??? I love it BUT it doesn seem to go further???

I get everthing displayed fine in the Product Page, including the Attributes, but when you push the buy now button it goes to the Product Info Page... Wich is a doule doule...

Cause Customer thinks ca select a Attribute and buy it, and than get to the product Info page where thay have to select again....

If I could make it happen I would like to see a BUY button that transfers all inforation right in the cart, and a more Info button that transfers everything into the Product Info page (selected Attribute)...

Anyway.... If someone remebers and figured it out, unlikely that they show up here again! Let me know!!!

Astrid

25 Feb 2009, 9:21 AM
#18
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

Hi Leialoha
What I wrote was only what my client wanted, so I do hope someone does take it further as I dont have the time now. At the moment what I wrote will only work when you have only 1 buy now button at the top and/or bottom, and no buy now button for each product. See this page to see how I have it. I do not know what happens if you have the Buy Now next to each product.

I do hope someone from Zencart sees the potential with this feature and includes it in the core system. You can see the benefit of being able to choose multiple products at the same time, rather than choosing each one separately.

26 Feb 2009, 8:25 PM
#19
nibblebot avatar

nibblebot

New Zenner

Join Date:
Jan 2009
Posts:
3
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

For those of you trying to use this for checkbox attributes and having it not work for you, attached is a modified version of attributes_listing.php that fixes the problem.

The problem is that the name attribute of the checkbox is not correct.

Only changes are in Lines 326, 329, and 332.

Cheers

27 Feb 2009, 8:06 PM
#20
maureent avatar

maureent

New Zenner

Join Date:
Nov 2008
Posts:
60
Plugin Contributions:
0

Re: drop down attributes at product listing page near add to cart button.

With some help from someone I paid to fix the issues I mentioned in my first post, I have this mod up and running on the store that I'll soon be going live with. It works with an Add to Cart button for every product, which, when clicked, takes the customer to the shopping cart. There is still a bug, but it only crops up if you have your store set not to go to the shopping cart when an item is added. I talked to the person who helped get it to work, and he was going to look into that, but he was busy at the time, so he never did see about it. Since it wasn't going to affect the store I'm working on, I didn't talk to him again about it.

You can see it at work at the URL below. Be aware that this URL will change once the store goes live since I'll be changing the folder name to the same as the old store that's presently on the site.

www. vetsupplements .com/catalog_new/index.php (remove spaces)

Once the store goes live, it will be changed to "catalog" from "catalog_new".

Because I hired someone to create a mod to the code, I'm hesitant to give it out here without asking him if it's okay (it's his work, after all). If he says it's fine, I'll do so. Until then, if there is someone who's tried the other fixes that are posted here and still can't get it to work with individual buy buttons, you can PM me.