Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Attribute Link to bypass product display?

    Hi,

    Does anyone know how I can add my attributes as a link on index categories page that goes directly to shopping cart and bypasses the product_info_display page?

    I have tried to implement this link code
    PHP Code:
    <form action="http://[your domain name]/index.php?main_page=product_info&amp;cPath=[your cPath]/&amp;products_id=[your products_id]/&amp;action=add_product" method="post" enctype="multipart/form-data" name="cart_quantity" id="cart_quantity">
    <
    input type="hidden" name="cart_quantity" value="1" maxlength="6" size="4" />
    <
    input type="hidden" name="products_id" value="[your products_id]" />
    <
    input name="image" type="image" title=" Add to Cart " src="includes/templates/template_default/buttons/english/button_in_cart.gif" alt="Add to Cart" />
    </
    form
    that I found in this thread - http://www.zen-cart.com/forum/showthread.php?t=43054 and the product goes straight to cart, which is great. However I can not get the attributes of that product to go straight to cart. Anyone know of any solutions or what needs to be replaced in the above code for attributes to work?

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Attribute Link to bypass product display?

    You would have to write a lot more code to make that happen. I've seen it done on a couple of Zencart sites. Both had slow page load problems, but I don't know if the attributes in the product listing was definitely the cause. There's a discussion here:

    http://www.zen-cart.com/forum/showthread.php?t=98641

  3. #3
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Re: Attribute Link to bypass product display?

    Hi Stevesh,

    I have got it to work using this code addition just before the closing tags on the form
    PHP Code:
    <form action="index.php?main_page=product_info&amp;cPath=3_143_41&amp;products_id=532/&amp;action=add_product" method="post" enctype="multipart/form-data" name="cart_quantity" id="cart_quantity">
    <
    input type="hidden" name="cart_quantity" value="1" maxlength="6" size="4" />
    <
    input type="hidden" name="products_id" value="532">
    <
    input name="image" type="image" title=" Add to Cart " src="includes/templates/template_default/buttons/english/button_in_cart.gif" alt="Add to Cart" />
    <
    select name="id[3]" id="attrib-3"><option value="3">x 250 £146.00 )</option></select>
    </
    form
    However it displays as a dropdown box and while it displays the price it also displays the quantity. I need a way now to remove the name of the option name, for example, the x250 part, but keep the price?

  4. #4
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Re: Attribute Link to bypass product display?

    I think I have what I need now in the following code. It allows me to place an add to cart for attributes anywhere on my site. All I had to change was option name to radio.

    PHP Code:
    <form action="index.php?main_page=product_info&amp;cPath=3_143_41&amp;products_id=532/&amp;action=add_product" method="post" enctype="multipart/form-data" name="cart_quantity" id="cart_quantity">
    <
    input type="hidden" name="cart_quantity" value="1" maxlength="6" size="4" />
    <
    input type="hidden" name="products_id" value="532">
    <
    input name="image" type="image" title=" Add to Cart " src="includes/templates/pnwtemplate/buttons/english/button_in_cart.gif" alt="Add to Cart" />
    <
    input type="hidden" id="attrib-3-3" value="3" name="id[3]">
    </
    form

  5. #5
    Join Date
    Aug 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: Attribute Link to bypass product display?

    Hi moesoap,
    I think that this exactly what I am looking for. Just wanted to know into which file you put the code in? (Hope that is not too dumb a question)
    Cheers
    Pacu

  6. #6
    Join Date
    Mar 2010
    Posts
    251
    Plugin Contributions
    0

    Default Re: Attribute Link to bypass product display?

    Quote Originally Posted by pacu View Post
    Hi moesoap,
    I think that this exactly what I am looking for. Just wanted to know into which file you put the code in? (Hope that is not too dumb a question)
    Cheers
    Pacu
    Hi Pacu,

    Only just seen this. If you still need this answered, The code can be placed in any custom page that you created using the html defines in languages. There is one issue with it though, the code is too long if you have loads of products and different options. It creates a very large file that needs to be transmitted from server to browser, so it is not ideal.

 

 

Similar Threads

  1. Display attribute under product name
    By DannyVarley in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 22 Jul 2014, 12:17 PM
  2. v151 Display Product Attribute Price on Product LISTING Page
    By y0ul053 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 23 Aug 2013, 07:46 PM
  3. Link Attribute Option To Another Product
    By antoineyow in forum General Questions
    Replies: 6
    Last Post: 25 Apr 2011, 09:02 PM
  4. Bypass Product Listing?
    By PaulineNMU in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 3 Dec 2006, 10:14 PM
  5. Product description link display?
    By JeffDM in forum Customization from the Admin
    Replies: 2
    Last Post: 7 Sep 2006, 07:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR