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

quantity discounts

Thread began 2/24/2010 1:02 pm by i.edwards384429 | Last modified 2/26/2010 6:34 pm by i.edwards384429 | 779 views | 8 replies

Jason ByrnesWebAssist

No, PowerStore does not offer this functionality. It can be added using eCart, but there will be a lot of code that will need to be modified by hand to make it work, it is not a supported feature.



the basics of quantity discounts is to create a new calculation called truePrice:
([Quantity] > 10)?([Price] - ([Price] * 0.1)):[Price]

You then need to modify the Total Price Calculation from
([Price]-[DiscountShown]) * [Quantity]

to account for the discount:
((([Quantity] > 10)?([Price] - ([Price] * 0.1)):[Price])-[DiscountShown]) * [Quantity]


the AdjustedPrice calculation also needs to be changed:
[Price]-[DiscountShown]

to:
([Quantity] > 10)?([Price] - ([Price] * 0.1)):[Price]-[DiscountShown]


The truePrice calculation will be used to display the item price to the customer, the TotalPrice calculation will be used to calculate the cars sub total.

This is where the code of PowerStore needs to be manually edited

In all of the checkout pages:
cart.php
confirm.php
checkout.php
pp_confirm.php
checkout_success.php
pp_checkout_success.php


You will need to find any place where the price is displayed using:
<?php echo WA_eCart_DisplayMoney($WA_Store_Cart, $WA_Store_Cart->DisplayInfo("Price")); ?>

or:
<?php echo $WA_Store_Cart->DisplayInfo("Price"); ?>


and change it to use the truePrice:
<?php echo WA_eCart_DisplayMoney($WA_Store_Cart, $WA_Store_Cart->DisplayInfo("truePrice")); ?>

or:
<?php echo $WA_Store_Cart->DisplayInfo("truePrice"); ?>


you will also need to edit the Local checkout code that passed the price, and change that to pass the truePrice:
$AuthNet_itemized[0][$nextIndex] = "Price";
$AuthNet_itemized[1][$nextIndex] = "".$WA_Store_Cart->DisplayInfo("Price") ."";


to:
$AuthNet_itemized[0][$nextIndex] = "Price";
$AuthNet_itemized[1][$nextIndex] = "".$WA_Store_Cart->DisplayInfo("truePrice") ."";




there may be other places it needs to be changed as well, the reality is there are simply to many places the price is used for me to be able to account for them all.

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