close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Is item value in cart?

Thread began 4/26/2011 8:09 am by web_assist_mail157665 | Last modified 4/26/2011 8:46 am by web_assist_mail157665 | 815 views | 3 replies


Is item value in cart?

First off - I've got a working solution - just doesn't seem very elegant and would be nice to find a generic way to do it, as this test comes up a lot.

Client wishes to return user to a specific page, if a certain item (from a particular product category) is removed from the cart (so the only option is to make a purchase from a particular product group)

I join my product_category and products tables together, so each product
has a category, and that category has a 'Required' 1 or 0 flag

<?php echo $row_rs_products_joined_with_categories['CategoryReqFlag']; ?>
which is added to the cart item ProductCategoryReqFlag
at the same time the product is added to the cart

what is the most elegant way to test for this value

and go to the page that is set up as CONTINUE shopping

so far have this

while (!$eCart1->EOF())

if (!in_array($target, $flags))
$eCart1->redirStr = "index.php?id_sec=62";
$eCart1->cartAction = "RedirectIfEmpty"; // just putting $eCart1->cartAction = "Continue"; doesn't work?

PS - I don't want to test for a specific ID in Cart
think we are looking for a function something like

function InCartVal($ItemProperty) {

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...