close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Coupons - Exclude certain products?

Thread began 11/15/2009 12:49 pm by psychobilly1165508 | Last modified 11/25/2009 9:44 am by Jason Byrnes | 8024 views | 47 replies |

psychobilly1165508

Coupons - Exclude certain products?

I need to have a coupon code that will exclude about 4 products in my database.

How can accomplish this? Using ASP/VB + MS SQL server.

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

Create a new column in the cart, for examples sake, lets call it "discounted". For items that the discount can apply to, set the value in the add to cart button for the discounted column to 1. for items it does not apply to set the value to 0.



When creating the discount rule, add the following trigger:
AND
Number of Item With a Specific Column Value:
Number of items where [discountable] has a value 0f [1] is [>] a value of [0]



for the calculation, use:
based on Items with a specific Value:
Total Of [Totalprice] where [discountable] has a value 0f [1] [times] [0.1]

for a 10 percent discount.

Sign in to reply to this post

larsentim278054

I'm confused. How do you setup the add to cart button for particular items differently than others? I mean, if you aren't setting up these pages manually? I guess, what I'm asking is, how do you assign an item a column value (the column you setup in eCart)?

I'm trying to apply a "Free shipping" promotion to only a certain brand of products. I tried doing the free shipping discount, and included the items in the trigger, but it then discounts the entire shipping amount, including items that were in the cart, that are not of that brand. So I need to figure out a way around that - and I think what you describe here is what I need, but don't know how to assign the items with the value I choose.


Thanks!


Originally Said By: Jason Byrnes
  Create a new column in the cart, for examples sake, lets call it "discounted". For items that the discount can apply to, set the value in the add to cart button for the discounted column to 1. for items it does not apply to set the value to 0.  
Sign in to reply to this post

Jason ByrnesWebAssist

I dont understand what you mean by:
"if you aren't setting up these pages manually"


is the product information coming from a recordset?

if that is the case, then you need to also create a corresponding column in your products table. In the database you will apply the value to that DB column. In the Add to cart button, bind the new cart column to the Database column.

Sign in to reply to this post

larsentim278054

Ahh.. Yes, that was the step I was missing. Okay, I understand now. Yes, the product is coming from a recordset. It's from PowerStore's product_results.php page. This is something I can do with that, right? Or because it's utilizing the search function to show the products, is this going to be more complicated...

So I add a column using phpMyAdmin to the Products table. Should I add a default value of zero?

After I do that, I goto the products that I want free shipping applied to, and in that new column, I add a # 1 to those item's. Then in the products_results.php page -> in the add to cart button, I bind that new column to the new column I created in the cart. This is the part I don't understand how to do, but I'm guessing that I'll figure it out.

Although I just read your other reply stating that eCart would need to support two shipping rate lookup behaviors, so is all this pointless? Is it really impossible to offer free shipping on certain products? Or were you stating that, in regards to the initial way I was trying to get this done. Adding the new column to the products table - will this method get around needing two shipping rate lookup behaviors, or will it just get me so far and I'll run into the same problem....

Sign in to reply to this post

Jason ByrnesWebAssist

my comment about two shipping rate lookup behaviors was to address wanting to show how much is being saved.

if you want to show how much the shipping would have been without applying free shipping to some of them, you have to use two shipping behaviors. One to lookup the total, one to lookup the discount.

I thought this thread was about applying the discount to certain items? This will not be affected by shipping unless I am missing something.

Sign in to reply to this post

larsentim278054

I guess I assumed that applying a discount to certain items would be similar to applying free shipping to only certain items. Am I mistaken? Is this impossible? Or are your instructions not going to work for discounting the shipping costs for certain items. I guess it doesn't matter whether to show how much the shipping cost they are saving, although that would be nice. But as long as it discounts shipping on only those certain items and not on items that aren't free shipping, that would suffice. Would this not accomplish this?

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, you can use the same method for free shipping.

Create a db column for shippable.

set it to 1 for products the shipping should apply to and 0 for products it should not apply to

create a cart column for shippable

bind the cart column and the DB column in the add to cart button.


it will get a little different here though,

In the eCart object, create a new calculation called shipWeight set the calculation to:
(([shippable] == '1')?[Weight]:0) * [Quantity]

Then on the confirm page for power store, find the followng code:

php:
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWeight"] = "".WA_eCart_FormatNumber($WA_Store_Cart->TotalColumn('TotalWeight'), true, 1)  ."";



and change it to:

php:
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWeight"] = "".WA_eCart_FormatNumber($WA_Store_Cart->TotalColumn('shipWeight'), true, 1)  ."";
Sign in to reply to this post

larsentim278054

Ah - thank you so much for this. I know I didn't explain it very well. Thanks! I'll let you know how it works out.

Sign in to reply to this post

Jason ByrnesWebAssist

You're welcome.

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