Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2006
    Location
    SF Bay Area
    Posts
    867
    Plugin Contributions
    1

    Default prevent expected products from being added to cart

    Hello folks;

    I am a bit confused about the Date Expected product field.

    When I set some future date here, the product still is able to be added to the cart.

    I can set the quantity to zero, but the product is displayed as Sold Out.

    At the bottom of the page is a nice box where my Expected Products show up, but I can't seem to find a way to allow my customer to simply browse these expected products without an option to buy them or showing the Sold Out message.

    Maybe I do not understand the intended use of the Expected Date field. Can someone say?

    Anyway, Showing the product as Sold Out before I even have it in stock may make the customer think incorrectly that all I am expecting have already been sold.

    To summarize, I am seeking to confine my Expected products to the Expected Products display box and allow browsing, but not offer them for sale before I have them.

    Thank you much;

    Kiddo

    PS: I am using Zen Cart 1.3.6 with no mods.
    Last edited by kiddo; 27 Dec 2006 at 10:05 PM. Reason: More info

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: prevent expected products from being added to cart

    At this time, the products_date_available field is a reference and not used to block purchases of products with stock ...

    You would need to customize the code further to manage that for you ...

    Currently, the 0 products_quantity will stop the product from being purchased ...

    We will be looking into adding more control on the products_date_available in a future release ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: prevent expected products from being added to cart

    You could customize the button function for the function zen_get_buy_now_button located in:
    /includes/functions/functions_general.php

    There is a select done on line 1129:
    PHP Code:
        $button_check $db->Execute("select product_is_call, products_quantity from " TABLE_PRODUCTS " where products_id = '" . (int)$product_id "'"); 
    Change that to:
    PHP Code:
        $button_check $db->Execute("select product_is_call, products_quantity, products_date_available from " TABLE_PRODUCTS " where products_id = '" . (int)$product_id "'");
        
    // upcoming date not available to purchase
        
    $upcoming_date_check time();
        
    $upcoming_date_check date('Ymd'$upcoming_date_check);
        
    $zc_current_date = (int)str_replace('-','',substr($button_check->fields['products_date_available'],0,10)); 
    Just before the default case statement add:
    PHP Code:
        case ($zc_current_date && $zc_current_date >= $upcoming_date_check):
            
    $return_button 'AVAILABLE: ' zen_date_short($button_check->fields['products_date_available']);
            break; 
    NOTE: there is no override for this file so save both the original and your changes ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Jul 2006
    Location
    SF Bay Area
    Posts
    867
    Plugin Contributions
    1

    Default Re: prevent expected products from being added to cart

    This is awesome Oba-san Ajeh !! Thank you !!!

    I will fire up my editor and make this work.

    This is not the first time you save me much confusion, I must buy you a cup of coffee today :)

    Kiddo

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: prevent expected products from being added to cart

    Coffee? I love coffee!!

    Let us know how it works for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Jul 2006
    Location
    SF Bay Area
    Posts
    867
    Plugin Contributions
    1

    Default Re: prevent expected products from being added to cart

    Quote Originally Posted by Ajeh View Post
    Coffee? I love coffee!!

    Let us know how it works for you ...
    I recommend Jamaican Blue Mountain Special. I sent you enough to buy some.

    Dear Kim XXXXXXXXX,

    This email confirms that you have paid Zen Cart E-commerce ([email protected]) $50.00 USD using PayPal.



    --------------------------------------------------------------------------------

    --------------------------------------------------------------------------------

    Payment Details

    Transaction ID: 0BXXXXXXXXXXXXXXXXXXXX300
    Item Price: $50.00 USD
    Total: $50.00 USD
    Item/Product Name: Zen Cart E-Commerce
    Buyer: Kim XXXXXXXXXXX

    --------------------------------------------------------------------------------



    Business Information

    Business: Zen Cart E-commerce
    Contact E-Mail: [email protected]

    Enjoy;

    Kiddo

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: prevent expected products from being added to cart

    Thanks very much for your support ... I and the Zen Cart Team greatly appreciate it ...

    I am very glad that this was able to help you out on your shop until we have had a chance to build up the functionality of the products_date_added to be more of a "working" field vs just a display field ...

    Well ... off to get some coffee!! Thanks again!!
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. How to prevent duplicates of products added to cart?
    By timbreman in forum General Questions
    Replies: 4
    Last Post: 31 Aug 2013, 10:09 AM
  2. Keeing products from 2 categories from being added into the cart
    By jamadri in forum Setting Up Categories, Products, Attributes
    Replies: 12
    Last Post: 30 Aug 2013, 11:59 PM
  3. Stop products from being added to cart.
    By distraub in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 17 Sep 2008, 06:52 PM
  4. Prevent &nbsp characters being added to CSS buttons?
    By matt g in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 8 Nov 2006, 08:35 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