Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Hold Item For Specific Customer Only

Hold Item For Specific Customer Only

Views: 746

Results 1 to 2 of 2
13 Nov 2012, 4:30 PM
#1
rick5150 avatar

rick5150

Zen Follower

Join Date:
Dec 2010
Posts:
108
Plugin Contributions:
0

Hold Item For Specific Customer Only

I have a very good customer that needs me to hold an item from the store to ensure he is the one to order it. Is there a way to make this item available only to that customer?

13 Nov 2012, 5:01 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Hold Item For Specific Customer Only

You could customize the functions_general.php in the function zen_get_buy_now_button and add the code in RED:

    switch (true) {
[B]// limit products_id 12 to customers_id 123
    case ($product_id == '12' && $_SESSION['customer_id'] != 123):
      $return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . 'LIMITED PRODUCT' . '</a>';
      break;
[/B]// cannot be added to the cart
    case (zen_get_products_allow_add_to_cart($product_id) == 'N'):
      return $additional_link;
      break;

which would only allow products_id 12 to be purchased by customers_id 123 ...