Showing results for 
Search instead for 
Did you mean: 

Admin Order - Apply Shopping Cart Rules?

Admin Order - Apply Shopping Cart Rules?

Hey Guys and Gals, we do a lot of phone-in orders, which we would obviously like to input via the Magento admin. We are also currently using the Amasty Promo Items extension to add free gifts (existing SKUs) with certain purchases. Straightforward "buy this get this specific thing free" stuff, no selections or anything. Works beautifully on the front-end, however the rules do not apply when manually creating an order in the admin, and the promo items are not added automatically.


I contacted Amasty, and they simply stated that it doesn't work on the back-end.


So my question there any way, either with our current setup or a different extension, that shopping cart rules (specifically buy one get something free) can be implemented in admin orders?



Tags (1)

Re: Admin Order - Apply Shopping Cart Rules?

Hi @SO_Curt,


One option could be to do a copy of the "free" products, and make them not active in the shop. Then you could manually add them when creating the order in the backend, like regular SKUs / products.

If you have multiple promos, this could be a challenge, but could be worth a try.


Also the extension from Magestore "Promotional Gift":

states that they can do this, when I asked the live chat support.


Please test the admin part here:

Frontend here:


-- Best regards --
Kent Christiansen / @KentChrDK / Magento Certified Solution Specialist / Visit my site (DK)

Re: Admin Order - Apply Shopping Cart Rules?

Thanks for the response! I had considered a manual solution, but that's something we are really trying to avoid with our order volume. Appreciate the lead to Magestore, I'll contact them and see what they say.

Re: Admin Order - Apply Shopping Cart Rules?

Awesome @SO_Curt,


Just let us know how it goes, and please remember to close the thread (mark it solved).


Thanks Smiley Happy

-- Best regards --
Kent Christiansen / @KentChrDK / Magento Certified Solution Specialist / Visit my site (DK)

Re: Admin Order - Apply Shopping Cart Rules?

Well, still no joy on this. Turns out the Magestore extension does not have the backend functionality we need after all.


Back at square one, and still desperately need a solution. Man Frustrated

Re: Admin Order - Apply Shopping Cart Rules?


This is similar to an issue that I have had myself in the past... running the script below worked for me... however it would need running for any 'new' products that you add in the future.. (I actually integrated the below into an import script so its ran when new products are created.)


To run it, create a file in the shell directory that is inside of your Magento install.


And then (if possible) run it via SSH using php -f filename.php (where filename is whatever you call the file). As I saidl this fixed my issue.. it might be different with yours.. but its worth a shot.


All the script does is apply the catalog price rules to each product... it may take a while to run but should do no harm to your store.




require_once 'abstract.php';

class Mage_Shell_Pricerules extends Mage_Shell_Abstract {

	public function run() {
		ini_set('memory_limit', '1024M');

		$args = $_SERVER['argv'];
		if(!empty($args)) {

		$this->db = Mage::getSingleton('core/resource')->getConnection('core_read');

			echo "Refreshing catalog price rules\n";

			$collection = Mage::getModel('catalog/product')

			if(!empty($args)) {
				$collection->addFieldToFilter('sku', array('in' => $args));

			$count = count($collection);
			$i = 0;
			foreach ($collection as $product) {
				$productWebsiteIds = $product->getWebsiteIds();

				$rules = Mage::getModel('catalogrule/rule')->getCollection()
						->addFieldToFilter('is_active', 1);

				foreach ($rules as $rule) {
					$websiteIds = array_intersect($productWebsiteIds, $rule->getWebsiteIds());
					$rule->applyToProduct($product, $websiteIds);

				echo "Applied rules to " . $product->getSku() . " (" . number_format(memory_get_usage() / 1024 / 1024 / 1024, 2) . "G, " . ($count - $i) . " products left)\n";


			$resource = Mage::getResourceSingleton('catalogrule/rule');

			echo "Reindexing catalog_product_price\n";
			exec('php indexer.php --reindex catalog_product_price');

			echo "Finished\n";



require_once str_replace('shell', '', getcwd()) . 'app/Mage.php';

$shell = new Mage_Shell_Pricerules();


Problem solved? Click Accept as Solution!
Magento Certified Developer Plus | | Magento Small Business Partner