Loaded Commerce Community

Banner


Board index » CRE Loaded Support » CRE Loaded 6.3

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Coupons revisited
PostPosted: Wed Jul 27, 2011 9:27 pm 
Offline
CRE Talented

Joined: Thu Dec 25, 2008 5:09 pm
Posts: 489
Location: CO
I got one problem fixed that was driving me crazy and now I am on a mission to try and figure out a logical issue with the ot_coupon.php file.

If I was really smart I could figure it out but here is what is happening....

If I add a product or category to the coupon Valid Products: or Valid Categories: section a discount is still applied to those products but at the original price versus the discounted price.

While this seems like an easy fix my brain just can figure it out....
I see the check section:
Code:
        if ($get_result['restrict_to_products'] || $get_result['restrict_to_categories']) {


Then there is other logic what seems like it gets the price of the product from the database and adds it to a total for the discount to be applied to.


Here is where my logic fails me versus how this module seems to be built: I would think this is the logic this file should use....
Keep the total cart value. Then if you find a product that IS NOT an included product or category then reduce the cart value by the product value.
Then once all products in the cart are checked apply the coupon discount.

I am looking all around for where in that file that the logic might be changed (like a == to a != or a + to a -). I know the logic is in there because when it finds a product that isn't valid to use the coupon code on it adds to non-discounted price.

Any help?

Mike


Top
 Profile  
 
 Post subject: Re: Coupons revisited
PostPosted: Wed Jul 27, 2011 9:56 pm 
Offline
CRE Legend
User avatar

Joined: Thu Jun 12, 2008 6:39 am
Posts: 2404
Location: New Zealand
What is it you're trying to fix? Got any actual numbers, results there. Easier to work backwards from that, rather than dissecting the ot_coupon file when you're not sure what you're debugging.

I can contribute this definite bug: discount coupons using % don't work with products that have price-adjusting attributes. Never have, probably in the 'too hard' bin at Cre.

Simon

_________________
www.codemehappy.com
For Cre Loaded tips, how-to articles and more


Top
 Profile  
 
 Post subject: Re: Coupons revisited
PostPosted: Wed Jul 27, 2011 10:24 pm 
Offline
CRE Talented

Joined: Thu Dec 25, 2008 5:09 pm
Posts: 489
Location: CO
Oh so hard to describe quickly....

Here is the background: 6.3.3 with salemaker in use.
Coupons with a 10% discount - no products with attributes that have $ added or reduced with the attribute.
I have included any product category or product to the coupon.

When I add a product to the cart and apply the coupon it gives the discount off the pre-salemaker price.
Price info:
$489.00 = MSRP ** Coupon applied here (discount $48.90)
$415.99 = Salemaker price

When I remove all products or product categories from the coupon then apply the coupon, the result is the coupon gives the discount off the salemaker price:
$489.00 = MSRP
$415.99 = Salemaker price ** Coupon applied here (discount $41.60)


So what I am trying to figure out is why anything at all is done to these products when the product isn't included in a coupon category, it should skip that product and move on the the next product. In other words it shouldn't apply the coupon to anything that isn't included in the coupon.

I hope that is clear - I've reread what I wrote and I think it is. If not let me know and I would be very happy to see if I am miss-communicating things and add info.

As always, Thank you,
Mike
FYI I am going to bed now since I didn't sleep last night or at all today. I'll check this again when I get up.


Top
 Profile  
 
 Post subject: Re: Coupons revisited
PostPosted: Thu Jul 28, 2011 3:32 am 
Offline
CRE Legend
User avatar

Joined: Thu Jun 12, 2008 6:39 am
Posts: 2404
Location: New Zealand
Ah right - it's SALEMAKER and coupon discounts you're on about. I assume you can in fact use a normal non-salemaker discounted product with a coupon and all is well, yes?

So to recap - salemaker was removed from 6.4.x because of functionality issues; 6.3.x was discontinued for the same reasons. Put them both together and you're in for a challenge.

As a test - try using a product on Special (or Specials by Category) and a coupon and see if that works.

If you want to get them to work together I'd recommend employing someone like Jason (creloadedexpert) who could possibly rewrite both to work together for you. Otherwise it'll just be an ongoing source of frustration as it's interactions between modules and not just coupons that is the problem.

Simon

_________________
www.codemehappy.com
For Cre Loaded tips, how-to articles and more


Top
 Profile  
 
 Post subject: Re: Coupons revisited
PostPosted: Fri Jul 29, 2011 10:17 am 
Offline
CRE Talented

Joined: Thu Dec 25, 2008 5:09 pm
Posts: 489
Location: CO
Simon,

I think you are letting salemaker and 6.3.3 cloud your thought just a little. The simple premise is that if the product is outside of a category or isn't a product a discount should be applied on the ot_coupon.php shouldn't act upon it. What I am finding is that it does. No matter what, the coupon is being applied to all products even if not included in the Valid Products or Valid Categories section.

If I could figure out why that is happening then it should be simple to fix. Yes salemaker and 6.3.3 (in its native form) had issues with lots of things. But I would be that my site has about 95% of the bugs gone now I just need to figure out this piece and I would say I am close to a solid cart since I have gone through every piece of the cart, found misspellings and verified everything works. The things that didn't work I fixed them.

Yes the code base if now old but why move to another code base that I would have to do the same for then have a hope upon hope that when 6.4.2x gets put out there that its version of salemaker (which I heard is what is being put back in) would work or the coupons would work?

If nothing else you have to agree with me that CRE has had a couple of misses in the past few years.
The code and idea behind CRE is great in my opinion... The lack of updates has made it ever move valuable to have my fixes to me since it gets feeds from my wholesaler, updates quantities and prices, give a google and other search engine feeds, has good seo ranking, does a weekly database backup, has all types of social media links into it now, etc. etc. I know what I've got -- with moving to 6.4.x I wont except I do know that 6.4.1 doesn't have the functionality that 6.3.3 has. (As I ranted long ago salemaker makes so my site takes a whole lot less time to maintain for the customer side and still allows me to offer specials -- great help to my business)...

Thank you for the help no matter if we disagree on the next course of action, I do appreciate you being willing to help folks here (me included).

Mike


Top
 Profile  
 
 Post subject: Re: Coupons revisited
PostPosted: Fri Jul 29, 2011 10:26 am 
Offline
CRE Talented

Joined: Thu Dec 25, 2008 5:09 pm
Posts: 489
Location: CO
Simon,

I think you are letting salemaker and 6.3.3 cloud your thought just a little. The simple premise is if the product is outside of a category, or isn't a product listed in the coupon, a discount should be applied and the ot_coupon.php shouldn't act upon it. What I am finding is that it does. No matter what, the coupon is being applied to all products even if not included in the Valid Products or Valid Categories section.

If I could figure out why that is happening then it should be simple to fix. Yes salemaker and 6.3.3 (in its native form) had issues with lots of things. But I would be that my site has about 95% of the bugs gone now I just need to figure out this piece and I would say I am close to a solid cart since I have gone through every piece of the cart, found everything that has been written as wrong (from this board mainly) including things like misspellings and verified everything works. The things that didn't work I fixed them.

Yes the code base if now old but why move to another code base that I would have to do the same for then have a hope, upon hope, that when 6.4.2x gets put out there that its version of salemaker (which I heard is what is being put back in) would work or the coupons would work? Or it would have other issues?

If nothing else you have to agree with me that CRE has had a couple of misses in the past few years.
The code and idea behind CRE is great in my opinion... The lack of updates has made it ever move valuable to have my fixes to me since it gets feeds from my wholesaler, updates quantities and prices, gives a google (and other search engine feeds - untested), has good seo ranking, does a weekly database backup, has all types of social media links into it now, etc. etc. I know what I've got -- with moving to 6.4.x I wont. I do know that with 6.4.1 it doesn't have the functionality that 6.3.3 has. (As I ranted long ago salemaker makes so my site takes a whole lot less time to maintain for the customer side and still allows me to offer a location for actual specials (versus putting everything into a specials table)-- great help to my business)...

Thank you for the help no matter if we disagree on the next course of action, I do appreciate you being willing to help folks here (me included).

Mike


Top
 Profile  
 
 Post subject: Re: Coupons revisited
PostPosted: Sat Jul 30, 2011 7:36 pm 
Offline
CRE Legend
User avatar

Joined: Thu Jun 12, 2008 6:39 am
Posts: 2404
Location: New Zealand
Mike

Don't underestimate the effect of salemaker on coupon prod/cat restrictions. You bring that into the mix, whatever the coupon side attempts to do, it'll get overwritten.

I'd be looking at salemaker more closely if you really want to dig through this. They didn't withdraw it without reasons.

Simon

_________________
www.codemehappy.com
For Cre Loaded tips, how-to articles and more


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

Board index » CRE Loaded Support » CRE Loaded 6.3

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
It is currently Wed May 23, 2012 7:23 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Login

Forums Latest Activity

Top Listing

1. Cart2Cart - Shopping...
    Category: Shopping Cart Database Conversion Scripts
    
2. Points & Rewards PLUS!...
    Category: Add-Ons
    
3. Configuration Server...
    Category: Fixes
    
4. Credit Card with CCV
    Category: Payment Modules
    
5. CC7333_ATS
    Category: Templates
    
Show more...

© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy