5 replies [Last post]
nathan's picture
Offline
Joined: 12/26/2007
Juice: 37
Was this information Helpful?

Hi all,

In my project i have to do change the "add to cart" button into "add to cart" link in product list page.

Is there any possibility to change this.

Please help me.

I have attached image for reference.

Thanks for your advance information

PreviewAttachmentSize
addcartlink.JPGaddcartlink.JPG59.18 KB
Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: How to change the "Add to Cart" button into link format in p

I think the easiest thing to do is to style the Add to Cart buttons to look like links, even though the browser will still treat them like submit buttons. The main thing is to change the default background image to the transparent color, and then to add the normal link styles.

Another option is to use the Cart Links module, but with this method, you can't use the quantity or attribute fields in the Add to Cart form. Otherwise, you'd have many, many links per product.

nathan's picture
Offline
Joined: 12/26/2007
Juice: 37
Thanks for your information

Thanks for your information

Now i am using the cart links modules. The products added successfully to cart but i used default qty=1. Is any possibility to add the attributes to the cart?

Thanks

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Thanks for your information

I know you can, but I don't know exactly how. Something about "a" and "o" with the right ids for the attribute and option, but I didn't see it in the documentation either. Hopefully somebody can point it out for us.

incaic's picture
Offline
Joined: 10/13/2007
Juice: 115
I know I saw an explanation

I know I saw an explanation about this a few months ago, but can't find it now.
Can someone please describe the format of the variable $data that holds attributes/options. (Ryan?)

incaic's picture
Offline
Joined: 10/13/2007
Juice: 115
Looked closer and it's

Looked closer and it's simply the serialized result of something like the following:

<?php
array(
      [
attributes] => array(
        [
3] => 6             // this is aid => value
        
......              // more attribute value pairs goes here
     
),
      [
shippable] => 1,
         ......             
// more options goes here
)
?>