close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Product Discount Dynamic (Name, QTY, Value)

Thread began 1/20/2020 3:39 pm by MAURIANS | Last modified 11/02/2020 7:26 am by Ray Borduin | 1267 views | 21 replies |

MAURIANS

Product Discount Dynamic (Name, QTY, Value)

Based on ECART 6 doesn't look like any DISCOUNT can be trigger by the product only, so I create separate TABLES to be entered by admin based on product selection by user.

1. DISCOUNT (session_id, productid, name, qty, value) will be displayed on product detail page.
(a) session_id = Cart Session
(b) productid = Product ID
(c) name, qty, value = discount

2. User can "check" all discounts, I would like to be auto selected and auto updated based on PRODUCT QTY = DISCOUNT QTY)
3. I checked ECART 6 features from what I see this isn't allowed.
4. When DISCOUNT(S) are checked will display in CART.PHP via "ADD TO CART", if user updates QTY would like to CART.PHP to display and auto update DISCOUNT(S) according to QTY changes.
5. Only PRODUCT PRICE should be effected by DISCOUNT...

Sign in to reply to this post

Ray BorduinWebAssist

The easiest way to do this is to save the discount amounts from the database into the session and then you can create a discount rule based on the saved session variable value.

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

MAURIANS

Does E-CART 6 support $_SESSION arrays as example:

$_SESSION["discounttid"] = array["productid","discountname","discountqty","discountvalue");

If so can I use DATABASE entries into a this array...

Sign in to reply to this post

Ray BorduinWebAssist

I'm sure we could get that working. The shopping cart is already a session array wrapped with some extra functionality. Maybe just add a column to the cart itself for the discountname, discountqty, and discountvalue for the product as it is getting added to the cart. Then it would probably be pretty easy to apply the associated discounts and display them in the cart since all of the data is already there.

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

MAURIANS

I did this in the begining but couldn't get E-CART 6 to display selected DISCOUNTS, so I made single SESSION with totals, any info you can give will be helpful - Thank You

Sign in to reply to this post

Ray BorduinWebAssist

I would use the cart column if you want each product to have a discount. It is just easier to keep track of if it is in the cart.

Once you have it in the cart, then I can help you display it how you want to.

Do you want it displayed on each line of the cart. Do you want each discount listed individually below? Do you just want the total discount shown at the bottom?

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

MAURIANS

See Private

Sign in to reply to this post

MAURIANS

So far no errors after updating files to "new" version of E-CART 6.

Attached Files
cart.php
eCart1_PHP.php
products_detail.php
Sign in to reply to this post

Ray BorduinWebAssist

OK... so what do you need help with? What exactly do you want to do?

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

MAURIANS

I.. Database is done and DISCOUNT values (name, qty, value) is inserted by PRODUCTID

A. Product
1. Discount Values are selected on product detail page once ADD TO CART is submitted
2. based on QTY only those DISCOUNTS will be added:

SAMPLE: if "discountqty" <= "ecart1_qty" then "discountvalue" will apply to PRODUCT PRICE

if "ecart_qty" textfield change then DISCOUNT will display in PRODUCT DETAIL page. and updated in CART session.

EXAMPLE:

PID = 1

QTY = 2

DISCOUNT( name, qty, value)

13% OFF, 0, .13 (13%)
9% OFF, 2, .09 (9%)
18%OFF, 3, .18 (18%)

only 13% & 9% will apply until QTY is 3 then all three TOTAL of DISCOUNTS (40%) will apply.

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