close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Get quantity of a specific product from the cart

Thread began 4/02/2020 5:57 am by Ian Sheldon | Last modified 4/02/2020 8:31 am by Ray Borduin | 338 views | 2 replies |

Ian Sheldon

Get quantity of a specific product from the cart

Hi Ray!

I would like to query the cart to get the quantity of a specific product that is in it.

This is so that I can stop people adding more items to the cart, than is in stock.

For example, when a product page is loaded I will get the quantity of the cart contents for that item (if it exists) and subtract from the stock in the database, giving the available stock to the that customer at the time.

Could you point me in the right direction as to how I might do this?

Cheers
Ian

Sign in to reply to this post

Ray BorduinWebAssist

Are you trying to get the total quantity for any shoppers, or just the current customer's quantity? To get the current customers quantity you can use:

$eCart1->GetInfo("ID","Quantity");

Sign in to reply to this post
Did this help? Tips are appreciated...

Ian Sheldon

Thanks Ray, just the current shoppers.

I know to do all that the cart would need to be stored server side and there isn't the budget for that.

Cheers
Ian

Sign in to reply to this post

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

Content

rating

Layout

rating

Ease of use

rating

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