close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Custom discount field on Cart

Thread began 9/25/2017 3:08 pm by danielsebas | Last modified 9/27/2017 1:13 pm by Ray Borduin | 304 views | 20 replies |

danielsebas

Custom discount field on Cart

Hi Ray, I want to add custom discounts to products, I want to add a text field in the Cart were I can put 5% or 10% or select the discount percentage from a select list and the cart to calculate the total values.
In the eCart object, in the discount tab it is only possible to add a discount if the item meets some criteria like total price, or total number or certain items, but I want this field to be available always to all products so I can add an individual discount to any item, so one item can go with 5% discount and other with 10%
Is there a tutorial that I can follow to do this?
Thank you.
Regards,

Daniel

Sign in to reply to this post

Ray BorduinWebAssist

You can do a discount condition of number of items in the cart >= 1 and then it will always happen.

Add a column to your cart called DiscountPercent.

Then add a calculation RowDiscount = [TotalPrice] * ([DiscountPercent]/100)

Then you can add a discount rule equal to the total of RowDiscount

Sign in to reply to this post

danielsebas

Thank you Ray, in the Discount tab I selected:
Total of unique items in the cart >=1

But in the Calculations option of the Discount tab I'm not sure what option to select to put it as equal to the total of the RowDiscount

The DiscountPercent column should be unique?
Thank you.
Regards,

Daniel

Sign in to reply to this post

Ray BorduinWebAssist

The discount column doesn't need to be unique.

In the discount column you can make the amount based on column total for the RowDiscount column.

Sign in to reply to this post

danielsebas

Thank you Ray!
It ended like the image. I will re do the cart display wizard to test it

Sign in to reply to this post

Ray BorduinWebAssist

yes that looks correct

Sign in to reply to this post

danielsebas

Thank you Ray. I edited the Add to cart button and I put the DiscountPercent column as editable. I try it as text box and as select. I rebuild the cart.php page adding the DiscountPercent to appear in it and I only got this (like the image attached) but it doesn't appear the editable field.
Regards,

Daniel

Sign in to reply to this post

Ray BorduinWebAssist

Now you have to update your add to cart buttons to insert the value for that field.

Sign in to reply to this post

danielsebas

I think it was an error with the cart. I re built it using another theme and it worked, but how can I make the Discount Percent editable in the cart like the quantity field? I need it because I'm using eCart to make orders in the admin interface.

Sign in to reply to this post

Ray BorduinWebAssist

Just go to the main menu and add it from: Webassist->eCart->Updatable Cart Field

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