close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Create a general qty for all items in cart.

Thread began 8/03/2014 9:36 pm by mycalidesigns | Last modified 8/07/2014 1:21 pm by Jason Byrnes | 3039 views | 9 replies |

mycalidesigns

Create a general qty for all items in cart.

I am creating a cart for catering service where i would like the qty to be the option for guest count. so far everything working ok but instead of displaying separate qty for individual items i would like it to be for all items. All items would have a single qty value .

Product Price
--------------------------------
steak $5
potatoes $1

__________________
Guest Count 25 Minimum

Total: (item+item)*guestcount

Sign in to reply to this post

Jason ByrnesWebAssist

how is guest count determined?

is it a column ion the cart?

or a session variable?

i need more details on how guestcont works to be able to answer

Sign in to reply to this post

mycalidesigns

Sorry for replying so late, right now I have it as the Qty for each item.

Qty is the guest count, but what i would like to do is have the qty(guest count) be global for all items in cart, if possible.

here is test site

website is in private message

Sign in to reply to this post

Jason ByrnesWebAssist

before they start adding items to the cart, have a page where they select the number of guests, use a form with a select list:
10
25
50
etc

when that is submitted use the Set Session Value server behavior to store the guest count selection in a session.

in the add to cart behavior, use the guest count session for the quantity.

Sign in to reply to this post

mycalidesigns

Thanks Jason let me give that a try. I will report back if any issues.

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

mycalidesigns

i don't know if my last question went through, how to i get the total number of rows in cart?

Sign in to reply to this post

Jason ByrnesWebAssist

Not sure I follow:

The total number of line items in the cart, or the total Quantity for the cart?

if the total number of line items, add a new column to the cart for example, lets call the column lineCount. In the add to cart buttons set that column to 1.

you can then get the total number of line items using:

<?php echo $cartName->TotalColumn("lineCount"); ?>

where cartName is name of the cart object.

if you want total quantity:
<?php echo $cartName->TotalColumn("Quantity"); ?>

Sign in to reply to this post

mycalidesigns

like always your the best!

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post
loading

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