You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Hi, I'm new at ClikcCart pro and slowly getting to grips with it.
My question is if it is possible to set an automatic discount so that the customer does not have to enter a code. i.e. some sort of automatic default discount code.
any help wouold be much appreciated.
many thanks.
Simon
Offline
A custom sales method should be able to accomplish that for you.
Offline
Hi Dave,
thanks for this.
Next question: Is it possible to exclude certain product categories from receving this discount code?
many thanks.
Simon
Offline
Category information isn't carried with products since a product may be in multiple categories. The custom sales method would need to do the determination whether or not to apply the discount based on the product IDs that are in the shopping cart.
Offline
Thanks again, and my apologies...I made a mistake in my question.
What I meant was: is is possible to exclude certain products from receiving the discount, and if so, how do I do this? what coding what I have to insert and where?
many thanks in advance.
Simon
Offline
The answer is the same, the custom sales method will have to handle excluding IDs if that is what you want. I'd suggest getting your basic sales method working correctly first then add the exclusion part to it.
Offline
Hi Dave,
thanks again.
I think the basic sales method is working fine. We've decided to offer a 30% sale off everything. But the problem is that we also accept donations on the store. We have the donations set up as a product.
So I'm trying to figure out how to do this. I have done a Custom Sales method like you suggested, and that works well - i have it deducting 30% off everything. But where and what do i add to get the product exclusion to this discount? It strikes me that this should be fairly straightforward, and that I am probably missing something here. Any more advice or answers would be muc happreciated.
many thanks.
Simon
Offline
In the samples provided there's a foreach loop through the cartids variable which is retrieved early in the code. One of the samples shows how to count the quantity of items in an order using $item['quantity']. If you use print_r to print the details of the $cartids array you should see that one of the things in the array is the identifier for the product. That array index is what you'll need to test to see if it is one of the identifiers that you do not want to discount.
Offline
Where can you find a list of custom sale options? For instance, this foreach thing. I want to do something similar to what's mentioned here -- all products in a given category or with ids that begin with a certain string -- get different discount levels. Can it be done?
Offline
There are really no custom sale options, you just have what placed into the cart array for the items, as Dave said if you use the print_r statement you will see all there is to work with. If you enter this line in a custom sale method after the cartids is set you will see what is there, this will only print for a superuser account
$cartids = $this->globals('ecom.checkout_cartids'); $cosess = $this->globals('ecom.checkout_cosess'); if ($this->globals('core_user.usergroup')=='superuser'){print_r($cartids);}
John
Last edited by dh783 (11-03-2010 12:37:27)
Offline