Here are how my categories are set up. They are all top level categories.
ID Category / Products
65 Books
67 Test category
I read through the documentation again and I ran the query to see if my master categories are set to 0 and the query came back good. I even went into my Admin -> Tools -> Store Manager, and click on "Reset ALL Products Master Categories ID"
But all my categories are getting the discounts I have setup.
At first I added this thinking I had was suppose to in order to make sure category 65 got the discounts but I found that without doing this it got the discounts and so do all the categories.
Code:
function exclude_category($category) {
switch($category) {
case 66:
return false;
}
return true;
}
So I them removed the above code and add this code below to try and exempt category 67 from the discounts but category 67 still gets the discounts with this code in there.
Code:
function exclude_category($category) {
switch($category) {
case 67:
return true;
}
return false;
}
Am I putting it in the wrong place in the code or something? Here is how I am placing these codes. I am placing them right below the function setup() code like below. In the very bottom of the file.
Code:
function setup() {
// Add extra levels and discounts here in this manner:
// "Buy more than 100 items, get 50 (% or $, as per admin) off"
// $this->add_extra_level_discount(100, 50);
}
}
function exclude_category($category) {
switch($category) {
case 66:
return false;
}
return true;
}
Bookmarks