Page 3 of 3 FirstFirst 123
Results 21 to 27 of 27
  1. #21
    Join Date
    Feb 2010
    Posts
    10
    Plugin Contributions
    0

    Default Re: Can I display "Sold Out" button AND "Add to Cart" button on product information p

    Quote Originally Posted by kobra View Post
    Well I would create a "Special Order" image that would replace the add to cart if the stock is "0"
    You will need a stock check and a if/else to trigger the image swap
    Thanks for the response Kobra.

    I have worked out how to change the image. The problem now is that I can't work out a way to still let them order the "special order" items (i.e. add to cart). Any ideas would be greatly appreciated.

  2. #22
    Join Date
    Nov 2009
    Posts
    56
    Plugin Contributions
    0

    Default Re: Can I display "Sold Out" button AND "Add to Cart" button on product information p

    Quote Originally Posted by tojasonharris View Post
    Thanks for the response Kobra.

    I have worked out how to change the image. The problem now is that I can't work out a way to still let them order the "special order" items (i.e. add to cart). Any ideas would be greatly appreciated.
    Yes when I started the thread I'd already found the advice here on the forum on how to change the sold out image to whatever is preferred.

    The only thing we need to figure out now is how to stop the "add to cart" button disappearing.

    Surely, this is an easy task? Please please Zencart master's help us!!!

  3. #23
    Join Date
    Feb 2010
    Posts
    10
    Plugin Contributions
    0

    Default Re: Can I display "Sold Out" button AND "Add to Cart" button on product information p

    Ok. Here's the code for the "add to cart" box:

    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
    // do nothing
    } else {
    ?>
    <?php
    $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
    if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
    // hide the quantity box and default to 1
    $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
    } else {
    // show the quantity box
    $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
    }
    $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
    ?>
    <?php if ($display_qty != '' or $display_button != '') { ?>
    <div id="cartAdd">
    <?php
    echo $display_qty;
    echo $display_button;
    ?>
    </div>
    <?php } // display qty and button ?>
    <?php } // CUSTOMERS_APPROVAL == 3 ?>
    <!--eof Add to Cart Box-->
    This is from:
    /home/[ADMIN FOLDER]/public_html/includes/templates/template_default/templates/tpl_product_info_display.php

    I'm fairly certain altering one of these "if" functions would fix the problem but haven't worked it out yet. Any help would be very much appreciated.

    =)

  4. #24
    Join Date
    Nov 2009
    Posts
    56
    Plugin Contributions
    0

    Default Re: Can I display "Sold Out" button AND "Add to Cart" button on product information p

    Quote Originally Posted by tojasonharris View Post
    Ok. Here's the code for the "add to cart" box:


    This is from:
    /home/[ADMIN FOLDER]/public_html/includes/templates/template_default/templates/tpl_product_info_display.php

    I'm fairly certain altering one of these "if" functions would fix the problem but haven't worked it out yet. Any help would be very much appreciated.

    =)
    Hey, well done finding that!!!

    With altering an IF function, could this code be tacked on underneath the code for the "sold out" button, which already displays at stock = 0 . . . . . or perhaps it would need some kind of AND statement before the 'Add to Cart' code and before the 'Sold Out' code.

  5. #25
    Join Date
    Feb 2010
    Posts
    10
    Plugin Contributions
    0

    Default Re: Can I display "Sold Out" button AND "Add to Cart" button on product information p

    I'm pretty sure the change would not need to be made within this text, but that's about as far as I've gotten... oh dear...

  6. #26
    Join Date
    Feb 2010
    Posts
    10
    Plugin Contributions
    0

    Default Re: Can I display "Sold Out" button AND "Add to Cart" button on product information p

    I'm willing to negotiate to pay someone to help me get this fixed. Please email me at tojasonharris (at) yahoo.com if you are willing to do this.

    All I want to do is add a data base query that checks and returns an image if less than 1 is in stock. If it were Excel it would look like this:

    =IF(QTY_IN_STOCK<1, [return out of stock image], " ")

  7. #27
    Join Date
    Feb 2010
    Posts
    10
    Plugin Contributions
    0

    Default Re: Can I display "Sold Out" button AND "Add to Cart" button on product information p

    We did get a fix for this. It should show up on the free downloads area eventually. If anyone has a link for it, please post it here.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. v151 Getting rid of "add to cart" and just have a "buy" button
    By BryanKollar in forum General Questions
    Replies: 5
    Last Post: 22 Feb 2014, 06:41 PM
  2. Quantity Discount box and "add to cart" button does not show up in "Category" view
    By petro in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 10 Nov 2013, 09:48 PM
  3. v150 "Sold Out" -- how to add text below button?
    By WebKat in forum General Questions
    Replies: 2
    Last Post: 31 Jul 2012, 02:35 AM
  4. Replies: 0
    Last Post: 2 Jan 2011, 01:14 PM
  5. Show both "Add to Card" and "Sold Out" button
    By lgarner in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 4 Feb 2010, 04:16 AM

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