Magento Update Subtotal - php

I've tried the suggestions here: Magento update subtotal item
I have a Magento site with several extensions. We're using Amasty to add 'bonus' items. The problem is we want those items to show up and be added to the subtotal if the user selects 30 day billing.
I've tried making a simple extension and hooking to various events, but it looks like Amasty always has the last word when updating the subtotal.
I've even modified the Dispatcher so that it logs who it's dispatching to to see if I can track down where it's getting updated but to no avail.
How can I make sure that the extension I write is the final one to update the subtotal/total for the order?
It's right after checkout that it's being updated by something to exclude the bonus item.s

Checkout sort order for each order total module.
On times one of the order total modules sort order is higher then total module.
Or logically sort orders have some wrong values.
First you need to check that.
I had seen something similar happen when an old Magento commerce version was updated.

Related

Error in Reinxdeing in Magento

1.I m adding a configurable product in magento ,with some price and after adding sale tag over it for a particular duration it still shows up after the end of the date. Price is showing different on the page where all products are listed and different when I open it.
2.Sale product price do not update to back to normal after sale ends.
From call backtrace you can assume that OrganicInternet_SimpleConfigurableProducts is causing the issue. Module probably rewrote product price indexer model.
I have never seen this module before, so I can't provide anything further info. You should probably try disabling it and re-running the indexing.
As for the count column that's causing the issue, it was probably created by same module since it shouldn't exist out of the box.
Best of luck.

Opencart module quanity bespoke modification issue

I had a mod made for opencart enabling me to allow my local customers add additional item to their order 24 hours before local delivery.
Basically my shop is made up of one-off items and the quantity is generally 1
The modification that was made works fine but..
Say the conditions are: Iv'e added 3 items to my cart and processed my order for local delivery.
Then.. I go to add more to my order.
The form below on my pastebin allows me to add additional items to the order but when it does it re-checks the other items on the order and because they are technically out of stock they get removed from the amend order page.
I hope ive made sense and someone wants to help. Thanks!
CODE: http://pastebin.com/CsHts0FR

OpenCart: Adding payment specific order total

I'm developing a custom payment module for OpenCart. For this, i want a specific order total, but i'm unsure how to make a order total count only for this payment option.
So far i've laid out the basic file structures for a payment module, and i can choose it on checkout. I have also added my own order total to catalog/model/total
I'm guessing that i need some logic in the getMethod of catalog/model/payment/my_payment_module
Can anyone point me in the right direction?
I ended up solving this myself.
I added a new Order Total class. Inside it i checked for the correct payment method in the session before returning anything.
All the totals will update when the payment method is changed, so this works fine.

Getting Reorder to ignore stock levels in magento

i've been tasked to create a system where a customer can edit an order before it reaches the processing stage, i figure that the easiest way is to use the cart but with some edits to it to detect that your editing the order rather than making a new one
i have been testing out theories so far and everything seem to pan out, on theory i have been trying to get to work is utilizing the same process for re-ordering to populate the cart with the previous order, however i've ran into a problem, if an item is out of stock, it wont be added and until the customer confirms the changed to their order, i can go and release what they ordered, i can store how much the customer ordered but only if the item is added to the cart
so is there a way to get magento to add items to the cart with the re-order while ignoring what stock levels are
EDIT:
i've tried removing the Try Catch in Mage_Sales_Controller_Abstract in the function reorderAction() and it's adding the items however this means also i can't catch the exception of it's if it's just a notice or if there is any other reason why it can't add the item to the cart besides not having the stock
Got it working now, the trick was to enable Backorders and also modify parts of magento to prevent sellers from exceeding stock levels when they normally order (since if an item only has 6 in stock, with backorders enabled a customer can buy 10), after that it was simply setting up a system in the cart to detect when your editing an order and only allow backordering there since all orders are checked in the warehouse

Magento cart/order validation and manipulation

I'm completely new on working with Magento and I'm going to create a module in order to validate and in some cases manipulate some cart/order information.
To be specific I'm gonna restrict the customer from buying an item more than X times.
I've started working on this a bit, but I'm not so satisfied with the solution.
This is how I've done it so far:
I've created a new module with a controller which subclasses Mage_Checkout_CartController and there I've implemented the addAction-method. So every time a product is added to the cart I search through the user's order history and look for previous orders containing this product. Then I prevent it from being added and trigger an error-message.
It has a lot of shortcomings. For instance, if the customer isn't logged in at the time he can add the product, you can update the cart with too many... etc.
I would be me comfortable if I could hook on events, but I don't know where to start. Haven't found so good guides about this.
I want to do this verification when listing cart, updating cart and before submitting order.
So, my questions are:
How do I add observers on these events in my module? I couldn't get config.xml-configuration for event observing to work. I also need to know the names of these events.
How do I manipulate the quantity of an item in cart / delete it? When updating cart with too many of the products I want to change the quantity and trigger an error.
If you have any other ideas on a better solution for this, you're very welcome to comment.
I appreciate any help. Thanks.
I think this article should answer on all your questions. See events list at the bottom of this article. Do not forget delete cache after each change made to config.xml and other xml files in your module etc folder.

Categories