View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

trying to run a sale

Thread began 12/07/2009 12:50 pm by barbara224891 | Last modified 12/10/2009 5:01 pm by barbara224891 | 769 views | 4 replies

barbara224891

trying to run a sale

Hi, I have a site which would like to run a holiday sale. They have 30 or so items with prices that vary. During the sale, they'd like it to be 5 for $35 or 10 for $65 or 20 for $120, regardless of what items make up the 5 or 10 or 20.

I tried to make a discount equal to the cart subtotal in order to get rid of the regular prices and then a charge that had 4 tiers depending on whether total q is less than 5, between 5 and 10, etc.

I must have misspecified the discount, as the cart insists on adding in the old prices in addition to the sale prices. I've made the sale prices inactive until I can get the discount to work (some sale if things cost more, right?).

Here's the code from the cart object page which contains the discount and the 4 tiers:

function WAEC_WA_eCart1_removeregularpricesforsale() {
$totalDiscount = 0;
if (true && (($this->TotalColumn("TotalPrice") > 0))) {
$totalDiscount += (floatval($this->GetInfo("0", "TotalPrice")) * 0);//Result
}
return WA_eCart_FormatNumber($totalDiscount, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_WA_eCart1_tier1() {
$totalCharge = 0;
if (false && (($this->TotalColumn("TotalQuantity") < 5))) {
$totalCharge += (($this->TotalColumn("TotalQuantity") * 7.5) + 0);//Result
}
return WA_eCart_FormatNumber($totalCharge, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_WA_eCart1_tier2() {
$totalCharge = 0;
if (false && (($this->TotalColumn("TotalQuantity") >= 5) && (sizeof($this->Items) < 10))) {
$totalCharge += ($this->TotalColumn("TotalQuantity") * 7);//Result
}
return WA_eCart_FormatNumber($totalCharge, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_WA_eCart1_tier3() {
$totalCharge = 0;
if (false && (($this->TotalColumn("TotalQuantity") >= 10) && ($this->TotalColumn("TotalQuantity") < 20))) {
$totalCharge += (($this->TotalColumn("TotalQuantity") * 6.5) + 0);//Result
}
return WA_eCart_FormatNumber($totalCharge, $this->ForceDecimalsC, $this->DecimalPlacesC);
}

I'm also experiencing something concerning in that after every time I try to edit the cart object, I get a message that the cart object file has been edited outside of dreamweaver and I'm asked if I want to reload. But I haven't edited outside of DW, so where's that coming from? I wonder if there could be an issue about what version of ecart I used when I set the site up and what one I'm using now. I seem to be running 4.5.0 now. Not sure what I had when I set the site up, but it's been running a long time.

Any help? I'm attaching the cart object page. Oops, can't do that, as php files can't be uploaded. Have pasted the relevant code above.

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