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

Best eCart practice recommendation

Thread began 10/14/2014 8:27 pm by Steve | Last modified 10/15/2014 4:16 pm by Steve | 564 views | 17 replies


Best eCart practice recommendation

I’ d like a suggestion on best practices to check for a product intersection.

Our products have a StartDate and an EndDate saved as a Unix TimeStamp.

The logic for checking if an intersection exists is as follows:

if ($targetEndDate >= $startDate && $targetStartDate <= $endDate)
$showMe = 'trueness';
$showMe = 'false';

Our Product page has all the products listed so firing off the validation check on the Product page could be one solution.
The Add to Cart button takes us to the Cart page which looks like an equally viable page to use for checking if there is a clash.

My original logic is to take the first item set to the cart and establish a startDate and endDate, then each newly added product would run the conditional statement as the targetStartDate and targetEndDate. IF an intersection is present we show an alert (show region).

Validation on the Product page would have to block the adding of a new product that clashes but would make it more difficult to remove one item and select another.

Validation on the Cart page seems like it may be the best location to check for clashes but since there is no recordset and the eCart values are sessions, it seems I’d need to pull the productIds from the Session values and then do a comparison.

Before I start programming this , are their any suggestions on the best practices to achieve this goal in eCart (6)?

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...