Magento remove promotional code in customer transactional emails - magento

My client does not want his customers to have a copy of the promotional code they used to minimize the chance they would create a new account and use it again. I am viewing the invoice and order receipt transactional emails, and there is only reference to order.getIsNotVirtual() which I assume inserts details about the order. How would I go about locating reference to the promotional code itself?

You have to edit the layout of email like this :
<sales_email_order_items>
<reference name="order_totals"><action method="setTemplate"><template>sales/mytotals.phtml</template></action></reference>
</sales_email_order_items>
Then duplicate sales/totals.phtml to mytotals.phtml and remove the discount code with something like :
if ($_code!='discount')
This is for the order template, look at the sales.xml layout to find information about other emails

Related

How to change the title text on the Magento sales email?

How can I change the title text on the sale email?
I always get this in my email when I make an order,
Main Website Store: New Order # 100000016
I want to change it to,
[Name of my Store]: New Order # 100000016
Is it possible? where can I change it?
Also, in the sale email content,
Thank you for your order from Main Website Store. Once your package
ships we will send an email with a link to track your order. If you
have any questions about your order please contact us at
support#example.com or call us at Monday - Friday, 8am - 5pm PST.
Your order confirmation is below. Thank you again for your business.
Where can I change all this? Especially Main Website Store?
Go to System -> Configuration
Under the General Tab click General and select Shop Information. Enter the name of your store here.
The new order template files is located in
app/locale/en_US/template/email/sales/order_new.html
and
app/locale/en_US/template/email/sales/order_new_guest.html
You can edit these files directly, but it's better to create an overwrite in the Magento Backend:
System -> Transactional Emails -> Add New Template
and then choose New Order / New Order for Guest, click load template and edit the mail template. Template Subject will look like:
{{var store.getFrontendName()}}: New Order # {{var order.increment_id}}
Change this to:
[Name of my store]: New Order # {{var order.increment_id}}
I would recommend an email override extension such as https://www.yireo.com/software/magento-extensions/email-override. This allows you to override email templates in code rather than having to do it through the database. Makes it much easier to manage, transport to other stores, and is independent of core updates.

Magento create personal coupon to newsletter

With Magento version 1.7, how can I auto generate a personal 10% discount coupon for each newsletter receiver that can only be used once by that specific account/user?
Here is an idea. Actually 2 of them.
The quick one.
Create a coupon with your desired rules, set the number of uses to 1 per customer and unlimited for general usage and hard code the coupon code in the newsletter email.
Estimated time: 30 minutes including tests. Risk: minimum.
The slow but clean one:
Create an observer on the newsletter_subscriber_save_before or newsletter_subscriber_save_after that checks if the customer subscribes and if so, it creates a coupon with your desired settings. See this for creating coupons by code.
Then rewrite the method Mage_Newsletter_Model_Subscriber::sendConfirmationSuccessEmail so you can pass that code as a parameter to the e-mail template.
Something like this:
$email->sendTransactional(
Mage::getStoreConfig(self::XML_PATH_SUCCESS_EMAIL_TEMPLATE),
Mage::getStoreConfig(self::XML_PATH_SUCCESS_EMAIL_IDENTITY),
$this->getEmail(),
$this->getName(),
array('subscriber'=>$this, 'coupon_code'=>THE COUPON GENERATED IN THE EVENT)
);
Then modify the newsletter subscription e-mail template to include this:
Your coupon code is: {{var coupon_code}}
Estimate 4h-8h. Risk: "not that minimum".
I would take the first approach.
Use personal discount extension http://www.magalter.com/personal-discount.html to generate 10% discount coupon. You will be able to choose customers who can use this coupon.

Welcome email to include discount code for subscribers

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.

Magento DHL module, what it's supposed to do?

Should be an easy-to-find info, but I wasn't able to find any doc page explaining what the DHL module can do and what cannot. Specifically:
can automatically create the shipment? (I mean, in such a way that whenever an order is placed - w-and ithout any action by me - someone at DHL will be notified that there's a box to be picked up at my company to be shipped...)
can automatically create the tracking number and send it - via email - to the customer
or all it can do is just getting quotes?
No, and No. What it does do is allow for you to get, display, and record rates for the various shipping options.

How to alert Magento Site Admin about abandoned cart?

How could we alert a magento site admin about each abandoned cart immediately after it is abandoned?
Is it a default feature in Magento EE?
No it is not a default feature in Magento EE.
You ask how a site admin could be alerted of an event that is somewhat of a grey area.
Assuming that an abandon cart is defined by the following criteria (which in fact is not the definition but may be applicable to you)
A registered user (ignore guest users for sake of sanity here) has products in cart.
This user does not complete the checkout and leaves the store-front
A period of time goes by (eg 1 day) with no adjustments on the cart items
Assuming this situation is your abandoned cart scenario i could suggest the following :
1.) I would use the Magento Quote Object (this is the object that is converted to an order after a successful checkout.)
looking at the quote object there already seems like there are enough fields to be able to monitor when the quote was created, when it was updated, when it was converted and whether it was converted or not. If the object does not contain the data fields you need there is no reason why you could not extend it. See a sample snapshot :
My (naive) suggestion would be to set up a scheduled job, to run at the same frequency at which you define your "abandoned cart" scenairio (or any frequency for that matter).
The job could do something like the following :
1.) Instantiate a collection of quotes.
2.) Filter out quote's that have been converted
3.) Filter out quote's that have been created recently (less than the critria above)
4.) Filter out quote's that have been modified within the same time-frame criteria
at this point you should have a list of all quote's that have been created, perhaps been updated but not converted for the last 24hours (depending on your criteria of course).
If you get to this point, well then the rest is straight forward.
Extract the information you need from the quotes (id's names, numbers, emails etc), compile your report and email to the administrator.
it the best idea i can think of for now! i have not done this in practice...
Ofcourse you can set-up funnels and goals with Google Analytic to give you extensive information on your customers, including abandoned carts, but that doesn't answer your question.

Resources