Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    931
    Plugin Contributions
    9

    Default Searching a cart for Gift Certificates (GIFT-XXXX)

    While working on a module, I was wondering... is it possible to search the order/shopping cart's contents for a specific term. Say for example, searching for models that start with GIFT-XXXX?

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

    Default Re: Searching a cart for Gift Certificates (GIFT-XXXX)

    Are you trying to search an Order that has been completed or ... are you trying to search the Shopping Cart as it is being created?
    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!]
    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
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    931
    Plugin Contributions
    9

    Default Re: Searching a cart for Gift Certificates (GIFT-XXXX)

    Quote Originally Posted by Ajeh View Post
    Are you trying to search an Order that has been completed or ... are you trying to search the Shopping Cart as it is being created?
    Trying to search the shopping cart as it is being created.

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

    Default Re: Searching a cart for Gift Certificates (GIFT-XXXX)

    See if either of these two help you ...
    Code:
    global $cart;
    echo 'Cart get_product_id_list: ' . $_SESSION['cart']->get_product_id_list();
    Code:
    echo 'Cart get_products: ' . print_r($_SESSION['cart']->get_products());
    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!]
    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!

  5. #5
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    931
    Plugin Contributions
    9

    Default Re: Searching a cart for Gift Certificates (GIFT-XXXX)

    Quote Originally Posted by Ajeh View Post
    See if either of these two help you ...
    Code:
    global $cart;
    echo 'Cart get_product_id_list: ' . $_SESSION['cart']->get_product_id_list();
    Code:
    echo 'Cart get_products: ' . print_r($_SESSION['cart']->get_products());
    It did actually. Had to do a preg_match function on it. But it did the trick.

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

    Default Re: Searching a cart for Gift Certificates (GIFT-XXXX)

    Thanks for the update on what worked for you ...

    If you have some details on how you tested for the GIFT certificates specifically in your code, it might help others ...
    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!]
    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. Can I prevent Gift Certificates from being bought with Gift Certificates?
    By Brianwocky in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 21 Dec 2010, 07:11 PM
  2. total value of Gift Certificates in cart
    By gilby in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 25 Jun 2010, 03:14 AM
  3. Setup for Gift Certificates
    By kevinmc3 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 3 Dec 2007, 01:36 AM
  4. no need for gift certificates
    By marinela in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 31 Jul 2007, 07:31 PM
  5. Turn off Gift Wrap for Gift Certificates
    By tammy_kenny in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 25 Jul 2006, 12:54 AM

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