close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Quantity Rule?

Thread began 8/16/2013 2:58 pm by elewis93815 | Last modified 9/04/2013 7:37 am by Jason Byrnes | 1407 views | 7 replies |

elewis93815

Quantity Rule?

I think I may have a minimum rule in place on an ordering page but I'm not seeing it. When a customer goes to order "babycakes" which are sold in dozens, it automatically adds 4 to the quantity which gives them and charges them for 4 dozen. I am probably missing something somewhere, however, I am not seeing the rule for this section (babycakes). I've attached the files for review.

Attached Files
WA babycakes.zip
Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

elewis93815

I left a private message for you! Thanks!

Sign in to reply to this post

Jason ByrnesWebAssist

on the order display page, you have the following code:

php:
for ($n=0; $n<sizeof($cupcake1->Items); $n++)      {

    if ($cupcake1->Items[$n]->Cupcakes && $cupcake1->Items[$n]->Cupcakes > 0) {
      if ($cupcake1->Items[$n]->Cupcakes == 1 && $cupcake1->Items[$n]->Quantity < 4) $cupcake1->Items[$n]->Quantity = 4;
    }
  }



this forces a quantity of 4 if the Cupcake cart column is set to 1.

on the add to cart page, line 728 has the add to cart function for adding the baby cake items:

php:
$cupcake1->AddToCart($ATC_AddIfIn, $ATC_RedirectIfIn, $ATC_itemID, $ATC_itemName, $ATC_itemDescription, $ATC_itemWeight, $ATC_itemQuantity, $ATC_itemPrice, $ATC_itemPlatterOptions, $ATC_itemTaxable,1,$ATC_itemPrice);



the second to last argument is setting the Cupcake column to 1, this is being processed on the cart display page and forcing the quantity to 4. I updated that to 0 to prevent the quantity from being changed.

Sign in to reply to this post

elewis93815

Thank you very much Jason!

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

elewis93815

Ok, this is weird. We resolved this 2 weeks ago, however, I got an email from our client saying that the quantity is again defaulting back to four when Babycakes are added to the cart?????? The babycakes are sold in dozens so when a customer orders babycakes, typically they order 1 dozen. The cart doesn't give them the option of ordering less than 4.

Sign in to reply to this post

Jason ByrnesWebAssist

same problem as before.

line 730 is the add to cart function for the baby cakes:

php:
$cupcake1->AddToCart($ATC_AddIfIn, $ATC_RedirectIfIn, $ATC_itemID, $ATC_itemName, $ATC_itemDescription, $ATC_itemWeight, $ATC_itemQuantity, $ATC_itemPrice, $ATC_itemPlatterOptions, $ATC_itemTaxable,1,$ATC_itemPrice);




the second to last argument is set to 1, it needs to be set to 0. using 1 forces the quantity to 4

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