Zen Cart Logo
Forums / General Questions / in_cart_check() function not recognizing products id's with options?

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

Views: 693

Results 1 to 2 of 2
25 Apr 2013, 8:22 PM
#1
tcarden avatar

tcarden

Zen Follower

Join Date:
Oct 2012
Posts:
282
Plugin Contributions:
0

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.

25 Apr 2013, 8:28 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

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.