Magento: Shopping cart price rule gets applied, but discount not subtracted from subtotal - magento

I have created a shopping cart price rule in my Magento store (version 1.4.1.1), and it seems to get applied without issue on the frontend, but the discount isn't actually reflected in the subtotal or final total. The original item price is $45.00, and the discount should be $35.00, making the final price $10.00. Here are some screenshots of the setup. (Sorry, because I'm a new user it won't let me post images directly in this posting.)
http://imgur.com/a/hdYDb
Main rule page
Actions page
Cart showing that promotional code was applied
Reviewing order (last step before submitting order)
This particular item has some custom options set, which set the pricing for four individual options. The price for the product is $0.00, and then each option has it's own price (I didn't set this part up, so I'm not sure if I'm missing something from here too). Here's a screenshot of the product custom options page: http://imgur.com/uO9HG
Any thoughts? I'm fairly new to Magento, so it's possible I'm just missing something obvious. Thanks in advance for any help or guidance!

I actually JUST figured out what was going wrong, or at least, I figured out a solution, though not sure exactly why this was affecting the shopping cart price rules. You're right that I wasn't even able to get a simple price rule to work - it simply wasn't working no matter how I changed the rule. Anyway, while working on another issue, I realized that I was missing the Subtotal/Grand Total box on the front-end of the shopping cart (I installed a clean copy of version 1.4.1.1 on my localhost, which is when I noticed it was missing from my live site). When I re-enabled the Subtotal/Grand Total box, the rules started working again. (I suppose now that Magento has a place on the front-end to show the discount, it actually applies it, whereas before it would just do nothing.)
So, to re-enable the subtotal/grand total box, in the back end, I went to System > Configuration > Advanced > Enable the Mage_Tax module. Again, not sure why it was disabled in the first place, and I'm not sure if this affects anything else on the site, but it's been up for awhile now and I haven't noticed anything awry. Here's a screen capture of it working: http://i.stack.imgur.com/kjl6S.png

I think the problem comes from using SKUs with your custom options combined with restricting your price rule to the product SKU. Magento combines them using a hyphen - place a test order to see if this is the problem.
The SKU in a test order I made comes out something like this;
[ORIGINAL_PRODUCT_SKU]-[CUSTOM_OPTION_SKU]
At least, that's the result I'm getting from version 1.5.0.1
The quickest solution I could find was to match the rule on the product url key rather than SKU. It isn't the most intuitive solution, but since you wouldn't change the URL on the product (I hope), it will work where SKU's with custom options fail.
In version 1.4, the URL key should be available to choose instead of SKU already. So you can just select url key instead of sku and insert your product's correct url key in your shopping cart price rule. Just replace "SKU is ..." with "URL key is ..." inserting the correct url key for your product.
In version 1.5 I had to enable "Use for Promo Rule Conditions" on the url_key attribute like this;
Log in to Magento admin area
Navigate to Catalog > Attributes > Manage Attributes
Locate the Atrtibute Code "url_key" and click to edit it
Change "Use for Promo Rule Conditions" to Yes
Save the changes
you may need to reindex the Product Flat Data index at this point
Then I could use it in my price rule.

Had this same exact problem on CE 1.9 running PHP7, applying the Inchoo "PHP 7 compatibility extension for Magento 1" solved the issue!
https://github.com/Inchoo/Inchoo_PHP7

Related

Magento 1.9 Custom Math Pricing / Simple Product Issue with Price

I've installed an extension, Custom Math Pricing by Mico Solutions, and I am experiencing 2 issues with my site now.
Issue 1: When I customize the product, the price is updated correctly on the product page, however, when the product is sent to the cart, a portion of the price is missing (length x price per foot). I checked in the database to look for the price and could only find records of the wrong price so the price is only showing for the product page. The portion of the calculation that is missing from the price includes an attribute which is set as a variable rather than custom options. The custom options calculate perfectly.
Issue 2: When I customize a simple product and add it to the cart, I cannot go back to that product page and customize it a second time, the price remains fixed on the "base" price. Let's say the product has a base price of $10.00. When I customize it, the price stays at $10.00 but is different in the cart. I have to delete my browser cache and cookies in order to customize it again and by doing that, my cart is emptied.
So my question is, where in the code can I find the pricing that is being sent to the sales_flat_quote table in the database. Additionally, how can I debug or correct the issue of customizing a product a 2nd time?
It seems like you've got an issue with conflicting extensions. Your best bet is to go to the Admin modules section (Admin > System > Configuration > Advanced > Advanced) and disable anything else that appears to deal with product pricing. Reset the cache and index and try again. I am somewhat familiar with this extension and it's not compatible with configurable products... make sure your products are simple product types when adding products.

Prevent Magento Catalog and Cart Price Rules from stacking

So, the sites I'm running are running into a problem.
Site A has a sale category with a running 15% off.
Both sites have a coupon code that takes 10% off, they use the same code
The coupon excluded anything in the sale category.
The problem is the coupon refuses to apply to products in this category, regardless of the site. So if I use the coupon on Site B, and the product is in Site A's sale section, it won't apply.
I tried resolving this by setting the Catalog rule to stop processing further rules and setting up the priorities. However, this doesn't appear to have worked, as the coupon can still apply regardless.
Since both sites use the same code for their coupon, I can't recreate it as a separate rule on the other site. So I'm left with trying to make the rules stop stacking. Does anyone know of some way to do this?
It's kind of a hack, but I did figure out how to make this work. I basically just created a dummy cart rule using the same conditions as the catalog rule with a higher priority.

Magento 1.5.0.1 configurable products attributes not showing in front end

We have a Magento store on 1.5.0.1 Community Edition which uses configurable products with attribute sets to allow customers to select their preferred size and colour for a specific item (e.g., a shirt).
Each clothing range has its own attribute set, which was used to create the product, with simple products for each permutation of the product for stock keeping purposes.
We've compared all of the product's settings, and can't see any discrepancies between them, and yet one product range does not display the attribute drop-downs and add-to-cart button in the frontend, despite appearing in the frontend fine other than that.
I don't know if you have already found a solution, but after searching for a whole day, I've found what's causing the missing attributes in the front end for me... After deleting and readding simple products for a dozen times and making notes on the way I was quite sure that I correctly added simple and configurable products, so the problem has to be somewhere else. A casual look at the console in FireBug revealed a conflict in prototype.js... that's strange, since Magento comes with it. And I sure have not changed anything in it!
Did you at one point added jQuery to your Magento installation? If so, you HAVE to add 'jQuery.noComflict;' to the end of your jQuery file and the critical point is, to include the jQuery file BEFORE the prototype.js: The prototype.js is loaded by Magento in default/layout/page.xml at the beginning, so you have to add this line befor the prototype.js
jquery/jquery-1.2.6.noConflict.min.js
If you don't do that the drobdown item is shown but with not selectable entries, that's because the js/varien/product.js relies on the prototype.js to work. Without it your list won't be populated!
Hope it helps anyone searching for this mysterious problem... (the problem is also described here: Weird Chrome prototype/jQuery conflict)
Usually when the add-to-cart button does not display it is because your product has no inventory set. Remember that the configurable product needs to be set to in stock and the associated simple products have to have at least one item with non-zero inventory and be set as 'in stock'.

Magento: adding catalog price rules to options of a bundle

I've looking around and couldn't find how to do this.
I'd like to be able to set a catalog price rule for a specific option of a bundled product. Basically I want to set the price of any selection from option1 to be $0 in that bundle (but keep the price the same for that product if someone just adds the product to their cart from outside of the bundle). is there a way to do this that i'm missing?
The second approach I was thinking was to set the price to $0 of all those selections for that option (i saw a post on here on how to do something like that programatically) although without testing that that works, it seems like it wouldn't.
any ideas would be welcome.
This is something that Magento does not do by default. Additionally, beware of trying to change this through cleverness, as Magento has significant validation for prices once items are added to the cart (e.g. it will try to recalibrate them to the database on every page load). It sounds like trying to restructure the flow so that you aren't trying to use the shopping cart rules might be the best bet here. Would it be possible to use some other mechanism to give discounts, like a coupon code?

Product options and Add To Cart button don't appear on some pages in Magento

I have this issue where on some products the Add To Cart button and product options do not show up on the page. I have traced the code and have determined the problem is with the isSaleable attribute.
Tracing the code it seems like it should be returning true and if I hard code true in the isSaleable function everything shows up correctly. It seems to only be doing this for configurable products. Looking at the code and it looks like to me that the Config product bases the isSaleable on whether the product is enabled or disabled.
My question is, am I missing something else here and what would the repercussions would be if I were to just make that function return true all the time? We do not really use stock tracking.
It's been a while since I've worked with Magento CE, but I think isSaleable is tied to the stock management system. I think you need to check the stock options and mark it in stock (with, of course, the product set to enabled). I would avoid hardcoding any of the functions if possible.
Edit: Did you try Inventory -> Manage Stock to "No" ? This is kind of a no-brainer, but products are set to be disabled by default, so General -> Status to "Enabled" is also required.
Products not displaying and/or displaying "out of stock" is a common Magento "gotcha".
To help myself and others troubleshoot this frustrating issue, I've compiled this checklist from this excellent SE answer:
Magento products will not show in category
and have added #7, to address a possible Magento Enterprise Edition cause of the hidden / out of stock products problem.
The products must be Visible in Catalog.
The products must be Enabled.
Product must have a stock Quantity.
The product must be set to In Stock. If the product is set not to track stock, it still has to have a stock Quantity and be set to In Stock.
The product must be assigned to the target Category.
If using multi-website mode (or if you imported the products through Data Flow), the products must be assigned to the target Website.
Check Admin > Catalog > Categories > Catalog Events - make sure there is not a "closed" Catalog Event applying to your Categor(y/ies) or Product(s)
Refresh your Cache / Indices.

Resources