Is that possible, via Shopify Script Editor to show a user message when it tries to stack discount codes on the checkout?
I want to allow the user to add any new valid promotion code with regular behavior (attach)
But I want to show a message saying that would not be possible to use 2 discount codes at the same time
My current script is like this:
Output.cart = Input.cart
exit unless Input.cart.discount_code
if Input.cart.discount_code > 1
Input.cart.discount_code.reject({ message: 'Only 1 code can be applied at a time' })
end
Output.cart = Input.cart
Regular Behavior 👇👇
Thank you in advance
Shopify doesn’t allow user to use more than one discount code during checkout, you dont need to worry on this
The script editor does not allow to stack multiple coupon discounts, so you do not need to add this validation.
Related
I want to send automatically a mail to all customers whose order status is either payment_success or payment_success_cod after 5 days when order is not processed. I have to write this condition in product view page.
But i don't know the logic how to do this. Please tell me what should be the condition and how i will execute.
Thanks
You have this extension, but it's not free..
http://ecommerce.aheadworks.com/magento-extensions/follow-up-email.html
When you install this extension, you can go to :
Follow up emai > Manage Rule > Add Rule, and you create your rule.
So when a customer have make an order, and the status is XX, send..
You have all here :
http://ecommerce.aheadworks.com/media/catalog/product/cache/1/thumbnail/9df78eab33525d08d6e5fb8d27136e95/f/u/fue_rule.png
It's very simple with this extension, good luke ! ;)
The environment is Magento 1.7.
Basically what I want to achieve is when users subscribes to the newsletter, the system automatically include a discount code in their welcome email. This discount code is for one time use for per account.
Searched around and found a tutorial which is best suit my requirement. Based on my understanding on that tutorial, we need to fetch some values out of the module configuration and user the helper to send an email with a coupon code.
On top of the codes I've made some amendments:
1)
in the file
app\code\core\Mage\Newsletter\controllers\SubscriberController.php
before
$this->_redirectReferer() in newAction()
insert
$helper = Mage::helper(‘subscribereward’);
$promo_value = Mage::getStoreConfig(‘subscribereward/promocode/dollarvalue’);
$promo_min = Mage::getStoreConfig(‘subscribereward/promocode/minpurchase’);
$helper->addPromoCode($email, $promo_value, $promo_min);
2)
in the file
app/code/community/Dg/Pricerulesextended/etc/config.xml
replace
Pricerulesextended/Observer
with
Dg_Pricerulesextended_Model_Observer
I've followed the steps but still can't get it working. Anybody care to shed a light?
Aheadworks has an extension called Follow Up Email, and it does exactly that. Ive set it up for clients where when a customer signs up (or a number of actions) it sends a welcome email with a randomly generated coupon (or standard one).
Also what you could do is just make a coupon code and add it to a welcome email template. Just make a new transactional email and add the coupon to the template. No custom coding required at all.
While saving order programmatically, I am passing table (tablerate_bestway), but it is giving error
'Please specify a shipping method.'
My code to save shipping method
$shippingAddress->setCollectShippingRates(true)
->setShouldIgnoreValidation(true)
->setShippingMethod("tablerate_bestway")
->collectShippingRates();
However, if I pass flatrate_flatrate, it works. How to save tablerate_bestway?
Both, flat_rate and tablerate_bestway enable in Admin.
Solution sample is:
$shippingAddress->removeAllShippingRates()
->setCollectShippingRates(true)
->setShippingMethod('tablerate_bestway')
->setShippingDescription('Table Rate - Best Way');
Add Shipping Description and do not collect shipping charge.
I'm using magento 1.7, and one of the payment options is Paypal (UK) express checkout.
The problem is that I don't want paypal to send out emails with any tax breakdown on, is there a more straightforward way of solving this (at the Magento or Paypal end) rather than hacking the core module to pass sub+tax as sub and 0 as tax?
I can see that a lot of the fields are mapped in Model/Api/Nvp.php, but can't immediately see where I'd modify these values.
As far as I investigated, there is no easy configurable way to prevent taxes to be submitted to Paypal.
But indeed there is a core hack if you don't mind that only the total amount is submitted (no line items, no taxes).
Go to System/Config/Paypal and set Transfer Cart Line Items to No.
In your code go to function _validate() in class Mage_Paypal_Model_Cart.
At the end of this function add the following lines:
$this->_areItemsValid = false;
$this->_areTotalsValid = false;
Of course it is nicer to to rewrite this class in your app/code/local folder.
I'm trying to confirm an order using the Magento web-service. I can put an order on hold like this:
$result = $client->salesOrderHold( $sessionId, $order_id );
echo "Order on Hold: " . $result . "<br>";
or add a comment to the order, but I can't find the function to call to confirm an order.
NOTE: my orders are being confirmed manually, so, I need to do this using the web service.
any help is appreciated!
From Magento version 1.4.2, the status of an order can be customized. So now, you have two kind of value for a status order. Check this link to see what is possible and what are the differences between state and status. Magento state and status
I am not sure of what you are expecting by setting your order to "confirm". If it's just a display needs, you can create yours in backend menu System > Order Statuses. Then you can use the API to addComment with your customized status or an existing one but it won't change the state of the order. It will stay in "On Hold" if it is in this state.
If you want to change the state and not the status, you need to extend the api of the module Mage_Sales to allow to set a status to an order. Magento doesn't offer it by default. As it is written in the link provided in my comment, you cannot edit the status and a state of an order. The method addComment of the API doesn't change the state, it allows only to change the status in the comment. You have to create your method based on the class Mage_Sales_Model_Order_Api. See the following link to do it by yourself Create a custom API
Hope it helps