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

rating

Discount with different triggers.

Thread began 6/29/2012 10:18 am by Fritz Stickers | Last modified 6/29/2012 4:53 pm by Jason Byrnes | 878 views | 3 replies |

Fritz Stickers

Discount with different triggers.

Customers can fill in a textfield for a sticker (text-decal).

I want to make a discount when the customer orders more than 2 pieces* of this item (ID 829), but the column values "Size" & "EigenTekst" (textfield) has to be the same.
* 3-5 pcs : -20% * 6-9 : -30% * >=10 : -35%

I can't make this trigger in the eCart Object.
The trigger I already have is just a little start. Now it checks only when quantity = 3 and when Size = 15 cm, but Sizes are from 5 tot 100 cm in steps of 5 cm.
The discount result now (for testing) is the "TotalPrice"/2, but it must be calculated on the above conditions.

Is it possible to let this work ?

<%
function WAEC_stickersBE_MoreThanOne()
totalDiscount = 0
if (true AND ((WA_eCart_ConditionalTotal(stickersBE, "Quantity", "ID", "829") = 3) AND (WA_eCart_ConditionalTotal(stickersBE, "Quantity", "Size", "15") = 3))) then
totalDiscount = totalDiscount + (WA_eCart_ConditionalTotal(stickersBE, "TotalPrice", "ID", "829") / cDbl(2))'Result
end if
WAEC_stickersBE_MoreThanOne = WA_eCart_FormatNumber(totalDiscount, stickersBE.ForceDecimalsC, stickersBE.DecimalPlacesC)
end function
%>




Geert.

WAeCart 4.5.2 - Asp Vbscript

Sign in to reply to this post

Jason ByrnesWebAssist

i'm not sure i understand what you mean by:

"but the column values "Size" & "EigenTekst" (textfield) has to be the same."

please explain that in more detail.

Sign in to reply to this post

Fritz Stickers

When choosing 2 stickers with Size 15 cm and 1 sticker with Size 25 cm, this doesn't count for 3 same pieces.
"EigenTekst" : the input also has to be the same. 2 stickers "I love my dog" and 1 sticker " I love my cat" doesn't count for 3 same pieces.
The discount is only for exactly the same ordered items (stickers).
E.g.:
3 stickers "I love my dog" - 15 cm >>> discount OK : -20%

2 stickers "I love my dog" - 15 cm + 1 sticker "I love my cat" - 15 cm >>> discount NOT OK

Sign in to reply to this post

Jason ByrnesWebAssist

in the cart object, make sure the Size and text columns are set to unique.

On the calculations tab, create a new calculation as:

totalDiscount:

(Abs([ID] = 829 AND [Quantity] >= 3 AND [Quantity] <= 5) * ([Price] * 0.2)) + (Abs([ID] = 829 AND [Quantity] >= 6 AND [Quantity] <= 9) * ([Price] * 0.25)) + (Abs([ID] = 829 AND [Quantity] >= 10) * ([Price] * 0.3))




the on the discounts tab, create a new discount using the trigger:
Subtotal For Any Column;
If the Subtotal for column "totalDiscount" is ">" "0"

calculation:
Based on column subtotal:
subtotal of column "totalDiscount" "plus" "0"

Sign in to reply to this post

Fritz Stickers

I can not make it work.

Is there a possibility that you implement this discount rule when I choose support with a "premium ticket" ?

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, we could help you implement this in a Premium ticket.

Sign in to reply to this post

Fritz Stickers

ok ... how do I start ... I just submit the ticket with the same question ?

Sign in to reply to this post

Jason ByrnesWebAssist

yes, that is correct.

Visit the Support landing page, and click the Premiere ticket link top begin the process of submitting the question.

Sign in to reply to this post

Fritz Stickers

I still didn't got any respons from my premium ticket 147326 !?

Sign in to reply to this post

Jason ByrnesWebAssist

Please respond to the ticket with a US phone number or Skype address and we will arrange a contact time to look into the ticket with you.

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