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
    57
    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
    57
    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. Add extra "add to cart" button at bottom of product page
    By ct9a in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 12 Oct 2010, 09:19 PM
  2. Can I make the "add to cart" button refresh the product listing page?
    By quarrymen1 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 17 Jun 2010, 02:47 PM
  3. 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
  4. How to Remove just one "Display Product Add to Cart Button"?
    By scottwww1 in forum General Questions
    Replies: 12
    Last Post: 29 Oct 2009, 12:39 AM
  5. Change "Add to cart" button to "Download" button instead?
    By m_mbarakota in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 21 Jan 2009, 12:56 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