Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    12
    Plugin Contributions
    0

    cart error Both "More info" and "Add to cart" in product list

    Hi,
    I want to have both "More info" and an Add to Cart button on my product list.
    The customer can then choose wich one that suits her best.
    Anybody know how to do that?


    Best regards Gunnel
    www.tusenideer.se

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

    Default Re: Both "More info" and "Add to cart" in product list

    I guess you could code that, but suppose the one 'that suits her best' is the Add to Cart button on a product that requires the selection of an attribute (color, size, etc.) ? You wouldn't get the information.

    I think the best idea is to let Zencart do what it does. You can always replace the ... more info with something like 'Buy Now', which will still take the customer to the product info page where attributes can be selected.

  3. #3
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    12
    Plugin Contributions
    0

    Default Re: Both "More info" and "Add to cart" in product list

    I guess you´re right :-) But maybe if there was a function like; if there was an atribute then only the "More info" was shown, otherwise both

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

    Default Re: Both "More info" and "Add to cart" in product list

    That's kind of how it works now. If you have it set to show the Buy Now button on the product listing (rather than the quantity box), products without attributes will display the Buy Now button and the customer can click the image or product title to go to the product info page. If the products have attributes, just the ... more info link will display.

    I think most regular online shoppers know to click on the image or name to see more information, as that's how all the 'big' stores work.

  5. #5
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    12
    Plugin Contributions
    0

    Default Re: Both "More info" and "Add to cart" in product list

    Well, I really would like to have that text also. I do not think you can be too clear. Many shops have.

  6. #6
    Join Date
    Nov 2008
    Posts
    40
    Plugin Contributions
    0

    Default Re: Both "More info" and "Add to cart" in product list

    I use this on my product_listing.php to give me a buy now and details button on regular products and just more info if priced by attributes. I changed the details button to "more info..." for this example. Even though this gives you a buy now, I am sure you can tweek it to give you what you want.

    Code:
     // more info in place of buy now
            $lc_button = '';
            if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
              $lc_button = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
            } else {
              if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) {
                if (
                    // not a hide qty box product
                    $listing->fields['products_qty_box_status'] != 0 &&
                    // product type can be added to cart
                    zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N'
                    &&
                    // product is not call for price
                    $listing->fields['product_is_call'] == 0
                    &&
                    // product is in stock or customers may add it to cart anyway
                    ($listing->fields['products_quantity'] > 0 || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) ) {
                  $how_many++;
                }
                // hide quantity box
                if ($listing->fields['products_qty_box_status'] == 0) {
                  $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
                } else {
                  $lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />";
                }
              } else {
    // qty box with add to cart button
                if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
                  $lc_button= zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
                } else {
                  $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>&nbsp;&nbsp;'.'&nbsp;&nbsp;<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
                }
              }
            }
            $the_button = $lc_button;
            $products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id'])) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
            $lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
            $lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');
    to see it working look at my site in progress http://bumblebeebuttons.com
    Hope this helps,
    Ladybugmom

  7. #7
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    12
    Plugin Contributions
    0

    Default Re: Both "More info" and "Add to cart" in product list

    Ladybugmum: Thank you ever so much
    I try it during the weekend.
    Best Regards from a coooold Sweden
    //Gunnel

 

 

Similar Threads

  1. EasyPopulate problem: "Add to Cart" and "price" not showing on product info page
    By pcspot in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 29 Apr 2010, 08:06 AM
  2. Can I make all "add: 0" input boxes on product pages to "more info..."?
    By sfklaas in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Aug 2009, 06:05 PM
  3. Is it possible to have *both* "Buy Now" and "...more info"?
    By zcnb in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 22 Sep 2008, 05:49 PM
  4. "Add to Cart " and "More info"
    By Javier in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 3 Nov 2007, 07:55 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