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,841

Results 41 to 60 of 96
27 Jun 2009, 12:41 PM
#41
sadwargamer avatar

sadwargamer

New Zenner

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

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

sandeep8838:

I found one problem in the mod........ after clicking add to cart buttom, it is taking me to shopping cart page, but when i click return to shopping, it saying.......... 'sorry! the product was not found'

Hi all,
I have exactly the same issue - does anyone have a solution for this - as for me this is an awesome mod - but I will not be able to use unless I can get the "continue shopping" button to work.

any guidance on solution much appreciated.

regards
Andy

10 Jul 2009, 6:15 PM
#42
caborela avatar

caborela

New Zenner

Join Date:
Dec 2008
Posts:
36
Plugin Contributions:
0

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

sadwargamer:

Hi all,
I have exactly the same issue - does anyone have a solution for this - as for me this is an awesome mod - but I will not be able to use unless I can get the "continue shopping" button to work.

any guidance on solution much appreciated.

regards
Andy

Edit the file : includes/templates/[your template]/templates/tpl_shopping_cart_default.php
around line 133

Code:

<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_CONTINUE_SHOPPING, BUTTON_CONTINUE_SHOPPING_ALT) . '</a>'; ?></div>

Change to the following:

<div class="buttonRow back"><?php echo '<a onClick="history.go(-1)">' . zen_image_button(BUTTON_IMAGE_CONTINUE_SHOPPING, BUTTON_CONTINUE_SHOPPING_ALT) . '</a>'; ?></div>

This may not be the best solution but just works.

25 Oct 2009, 10:15 PM
#43
bangsters avatar

bangsters

Zen Follower

Join Date:
Jun 2006
Posts:
168
Plugin Contributions:
0

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

I have installed this mod but it's not showing. i followed the instructions on how to set the add to cart buttons and all that. but after copying the files nothing shows up in my product list. the "add to cart" shows instead of "more info" but the attributes do not show up and I still have to go to the product info page.

any suggestions???

25 Oct 2009, 10:34 PM
#44
bangsters avatar

bangsters

Zen Follower

Join Date:
Jun 2006
Posts:
168
Plugin Contributions:
0

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

Looks like in admin->product listing you have to enable "Display Product Name"....

works like a charm now. If I want to hide the products name, how can I use this so it shows up when I enable products_model???

26 Oct 2009, 12:12 AM
#45
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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

If I want to hide the products name

And you can think of a real-world case where you wouldn't want the product's name to display?
Even if you do have such a situation, you can add to your stylesheet

h3.itemTitle {display: none;}

to hide the heading (name) and nothing else.

26 Oct 2009, 1:04 AM
#46
bangsters avatar

bangsters

Zen Follower

Join Date:
Jun 2006
Posts:
168
Plugin Contributions:
0

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

yes actually we have a case where we have to hide product names, but not on all items. how we've done it is for some categories the product name only shows on the main item, then on sub items we only display prod codes.

thanks for the info on the css. i'll try that. :)

26 Oct 2009, 1:14 AM
#47
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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

h3.itemTitle {display: none;} will apply globally, so if you want it hidden on some products and not others you can use per-category or per-product stylesheets with only that rule for content. See the CSS_readme.txt file in /includes/templates/template_default/css/ for more info. The per-product stylesheets cannot apply to an individual product in a listing page, only to the product info page.

You say the products name is used only on the main product, and product codes on sub-products. Do those sub-products have the main product name as their name? What "product code" field are you using?

6 Nov 2009, 7:35 PM
#48
bangsters avatar

bangsters

Zen Follower

Join Date:
Jun 2006
Posts:
168
Plugin Contributions:
0

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

I noticed it is working for dropdown attributes. However, it is not showing checkbox attributes.

How can I get it to work for checkbox attributes as well?

4 Dec 2009, 10:51 AM
#49
briohny12 avatar

briohny12

New Zenner

Join Date:
Jun 2007
Posts:
48
Plugin Contributions:
0

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

Thanks for this great addition... it's exactly what I was looking for!! :D

I used the original code that Infocom used as i just wanted one 'add to cart' button. I had one dropdown attribute and it worked perfectly. My client has now asked me to add a 'text field attribute'.

I have added the text attribute (easy enough!) and it displays both on the product listing page and the product info page. However, if you add to cart from the product listing page, the text attribute is not carried on to the shopping cart page. The dropdown attribute is however.

If you add to cart from the product info page, then both attributes are carried forward.

There is something that i must have to add to one of Infocom's files... i'm not great with the old code, so if someone could please advise, i'd really appreciate it.

Many thanks in advance!

12 Dec 2009, 2:18 PM
#50
briohny12 avatar

briohny12

New Zenner

Join Date:
Jun 2007
Posts:
48
Plugin Contributions:
0

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

Bump bump!! Anyone know how to use this product listing with text attribute fields? I've been searching the last 10 days without any luck. Would appreciate any help! Thanks.

13 Dec 2009, 2:45 PM
#51
briohny12 avatar

briohny12

New Zenner

Join Date:
Jun 2007
Posts:
48
Plugin Contributions:
0

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

Ok, I think I have to change something in the following piece of code that is found in InfoCom's Shopping_Cart.php (line 1720) file:

// ***************************************** *****************************************
  // ***************************************** *****************************************
    if($qty > 0)
    {
     $matc_product_quantity = $_POST['products_id'][$prodId];
     if($matc_product_quantity > 0 )
     {
      $attributes = ($_POST['id'][$prodId]) ? $_POST['id'][$prodId] : '';
     }
     $this->add_cart($prodId, $this->get_quantity($prodId)+($new_qty), $attributes);
    }
    
  // ***************************************** *****************************************
  // ***************************************** *****************************************  

Can anyone please suggest what i need to add/alter to get the text attribute to be carried from the products listing page to the shopping cart?

13 Dec 2009, 3:52 PM
#52
briohny12 avatar

briohny12

New Zenner

Join Date:
Jun 2007
Posts:
48
Plugin Contributions:
0

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

I've done some more investigating. It looks like the value 'products_options_value_text' is being called in Infocom's shopping_cart.php file

$attributes = $db->Execute("select products_options_id, products_options_value_id, [B]products_options_value_text
[/B]                             from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . "
                             where customers_id = '" . (int)$_SESSION['customer_id'] . "'
                             and products_id = '" . zen_db_input($products->fields['products_id']) . "' " . $order_by);

But I can't find it's reference in Infocom's attributes_listing.php file. I'm guessing this is the problem as to why the value isn't being passed??

Can anyone shed some light for me please?

10 Feb 2010, 11:12 PM
#53
division_x avatar

division_x

New Zenner

Join Date:
Feb 2010
Posts:
4
Plugin Contributions:
0

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

Hi, I just installed the mod and it works! Thanks,

My main concern right now is trying to change the layout of each product table row.

Right now the add to cart button is on the right side of the product info and attributes section.

I would like to have the add to cart button to the left side of the box. I would also like to change the order of the product price and name to go with these changes.
How do I move it there? also how do I rearrange all the other elements in each box.

I've been looking through all the files that pertain to the layout, edited css and I can't seem to figure out how to change the layout order.
Please pardon my newbieness here since this is my first shopping cart project.
Would appreciate an answer soon thank you.

10 Feb 2010, 11:19 PM
#54
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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

A link to see your site?
The order of the listing elements is settable in admin > Configuration >Product Listing.

10 Feb 2010, 11:47 PM
#55
division_x avatar

division_x

New Zenner

Join Date:
Feb 2010
Posts:
4
Plugin Contributions:
0

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

gjh42:

A link to see your site?
The order of the listing elements is settable in admin > Configuration >Product Listing.

That answered my question thank you...
didn't know I could do it from the admin panels....

12 Feb 2010, 1:31 AM
#56
division_x avatar

division_x

New Zenner

Join Date:
Feb 2010
Posts:
4
Plugin Contributions:
0

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

So now that I have the layout in the right order I've been trying to position the elements in each table row. So far my changes to the CSS have had no effect in moving things around. Looks like all the info is contained within a form and all the info is v-aligned centered.

I'm basically trying to do several things...

  1. Position the product name towards the top left of the table row
    with the description underneath it.

  2. The drop down attributes floated to the right near the checkout cart.

  3. A 1px border all the way around the tr that contains the product info and shopping cart checkout. (tried it in css but only seems to work with td's). Is it possible to put the add to cart elements in a separate div or assign a separate class to the table that contains it?

  4. The width of the shopping cart item quantity text field reduced.
    (seems like when I make it smaller in css the img gets small within it too.)

It looks like a mod may have to be done to product-listing.php,
something I'm not comfortable doing.

Thinking ahead I'm eventually going to add imgs to each product with the item name on top of the img and a descrition to the right.

here's a link to the page.

12 Feb 2010, 6:46 PM
#57
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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

In your stylesheet, find```
.productListing-data {border:0;
margin-bottom:2px;
}

vertical-align: top;

/product listing boxes/
.productListing-rowheading {display:none;
}
h3.itemTitle {/float:left;/
}
.listingDescription {/float:left;/
text-align:left;
position:relative;
top:0px;
left:0px;
}

#productAttributes {padding:0px 0px 0px 5px;
width:200px;
text-align:left;
vertical-align:top;
float:right;
}

They will not go all the way to the right, because they are inside the listingDescription (and the form that wraps the whole thing). You might be able to tweak negative margins and paddings for clearance, but that might break on different items with different content.

I see a couple of things that could be improved with the mod. 
There are ids on some attribute elements that were fine in the product info page, but are duplicated now in the listing page. These should be changed to classes.
I don't see a reason for the form to wrap the name and description as well as the attributes - could this be tightened up?
12 Feb 2010, 10:29 PM
#58
division_x avatar

division_x

New Zenner

Join Date:
Feb 2010
Posts:
4
Plugin Contributions:
0

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

Thank you.
Going to play with the positioning a little bit more and see.

And I agree, the product info and display should be taken out of the form... but I don't know how to remove it since I'm not a programmer.
It would be nice to put unique ID's for each table element too.

I got a ways to go with styling the entire store and it would be nice to get this sorted out.

3 Mar 2010, 1:04 AM
#59
gaurav10feb avatar

gaurav10feb

Zen Follower

Join Date:
Jan 2010
Location:
Australia
Posts:
243
Plugin Contributions:
1

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

I have gone thru this thread and very confused...
can someone please tell me how can i show attributes option in product listing .....
thanks

Believe it or not But My existence is illusional

30 Apr 2010, 4:20 PM
#60
alecat83 avatar

alecat83

New Zenner

Join Date:
Mar 2010
Posts:
12
Plugin Contributions:
0

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

Hello guys, nice mod but I have a little problem:

I've added a attribute "size" to my products and it is shown correct in the product listing, but when I click to the "buy" button it take me to the product info page and not to the cart and it don't add the product..

Can you help me?

Thank you

Alessandro