Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2012
    Posts
    282
    Plugin Contributions
    0

    Default in_cart_check() function not recognizing products id's with options?

    i'm having trouble using the function …

    $_SESSION['cart']->in_cart_check('products_id', ###);

    with products that have options. for example my product 248, when in the cart reads as 248:6c6e93eabd3812826160b3c028ece4a0

    so when product 248 is in the cart, the above function does not recognize.

    any advice on how to deal with that?,

    guess i'll have to write a string function to deal with it.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: in_cart_check() function not recognizing products id's with options?

    This will return true if product 248 is in the cart with any attribute combinations:
    $_SESSION['cart']->in_cart_check('products_id', 248);

    It will not tell you if a SPECIFIC attribute combination is present.
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 11 Jan 2011, 02:53 AM
  2. Columns vs. Rows... not recognizing
    By xfourninetwox in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 27 Apr 2010, 02:51 PM
  3. 1.3.8-1.3.9 not recognizing
    By samuelsmith1979 in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 26 Apr 2010, 06:41 PM

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