I am using magento 1.8.1
I am using zip code Check Delivery Details, like to check if delivery service is available at the client area or not and this is general.
this is working fine.
But now I want to do this product specific like some product are avaialble to some are with different delivery details for eg, xxx product is available to 111111 zip code in 6 days, to 222222 zip code in 2 days , 33333 delivery not available etc.
I want such product specific delivery detail checking.
Can anyone help me to know if such extension is available or not.
or any specific coding for this.
You need to create your own shipping module to inform whether the product is available for delivery or not.
Check How to create custom shipping module http://excellencemagentoblog.com/magento-create-custom-shipping-method
Then in function
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
{
//check your product shipping availability based on your conditions.
// set all the shipping parameter if product shipping is available.
// or set error message to display user
}
for any queries reply back.
Thank you
Related
I've been trying for the last week to find a way in Magento to have some conditions for shipping. What I mean:
whenever a certain product is shipped to a certain country I want Magento to use a specific courier but I don't want it to be shown on any other products.
The problem is that we don't have one storage place, we have many in different countries. Let's take England as an example. I have a bag that is made in UK. Worldwide delivery is set to a fixed amount using UPS. But I have another deal with a local courier. And I want these products (that are made in UK) to be shipped with this courier IF they are shipped in the UK.
I tried adding an attribute to these, but I don't find an action to show this method. Also, for other products or if the address is not in England this method should not be displayed.
It is possible do it with Magento shipping extension. You can try those free shipping extensions, or ask for trial of extensions that need pay.
I recommend use Owebia Shipping 2 which need a lit bit 'code' to program your shipments.
and you also need add new product attribute for define where this product made. Usually this attribute select type is a drop-down list.
Assume this product attribute code is made_from and attribute value is UK. here is the simple code for condition you mentioned:
Let's take England as an example. I have a bag that is made in UK. Worldwide delivery is set to a fixed amount using UPS. But I have another deal with a local courier. And I want these products (that are made in UK) to be shipped with this courier IF they are shipped in the UK.
here is the code for this example:
{
"outsideUK": {
"label": "UK local carrier",
"conditions": "{shipto.country_id} == 'GB'",
"fees": "1000"
}
}
Play with this extension if you interesting. I will update more detail if I got time.
I have multi store website in magento. In one of my website I want to restrict the countries that I can make shipping. But the payment can be received from anywhere of the world. I have tried
system --> configuration --> web --> general
And
system --> configuration --> shipping method --> specify country
but the problem is that in checkout page, I want to show all countries name in the dropdown list of billing information and I want to show only a specific country, eg: India in the dropdown list of shipping information. Is there any way to do so? Any help would be great full... Thank you.
From Class : abstract class
Mage_Checkout_Block_Onepage_Abstract
public function getCountryHtmlSelect($type)
$select = $this->getLayout()->createBlock('core/html_select')
->setName($type.'[country_id]')
->setId($type.':country_id')
->setTitle(Mage::helper('checkout')->__('Country'))
->setClass('validate-select')
->setValue($countryId)
->setOptions($this->getCountryOptions());
So setOptions($this->getCountryOptions() is responsible for that drop down list of shipping countries.
Here you place is $type is equal to shipping then call $this->getShippingCountryOptions()
follow this by writing your own code for this function refering to function getCountryOptions() code.
Note : Do not touch core files. This is just a guideline.
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.
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.
I activated flat shipping in the shipping options and whenever you do checkout it says “Sorry, no quotes are available for this order at this time.”Any one please help me since i am a beginner in magento.
EDIT
I have tried other shipping methods too its also showing the same. we have upgraded Magento ver. 1.4.1.1 to magento 1.7. Any help would be greatly appreciated..
EDIT 2
After upgrading community folder contains only Phoenix folder. After that i added Biebersdorffolder by seeing an error in checkout page. I don't the the purpose of folders AW and RocketWeb. Since i am not familiar with magento.
If the image is not visible i have added the image in this url
http://i47.tinypic.com/14smix1.jpg
do you have any Checkout files modified on your project? Or maybe custom checkout.
I will list the code locations you need to check to make sure your Shipping works correctly.
So to begin with: Magento has very special work process with Shipping rates - it's called "collectRates" and is some modification of pattern "composite".
To make sure that everything works correctly on the code basis you need to first check the Onepage.php model (app/code/core/Mage/Checkout/Model/Type/Onepage.php): lines 330, 341, 556, 616; There should be code
{address}->setCollectShippingRates(true)
where {address} is current address variable.
This code is significant for future "collectRates" processes, because just when the Onepage Checkout page is initializing the "collectRates" process has already been processed, and the flag "collect_shipping_rates" is set to "false". If it's not set back to true, the next "collectRates" process will not be performed.
After you check the location above, and it still doesn't work - you might want to add some logging to Mage_Checkout_Block_Onepage_Shipping_Method_Available::getShippingRates method. If method is properly executed and return some rates from $this->getAddress()->getGroupedAllShippingRates() call, there might be some issues with .phtml template on your locan theme (default path to .phtml is app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml).
Here's how you can log the outcome from $this->getAddress()->getGroupedAllShippingRates() call (Mage_Checkout_Block_Onepage_Shipping_Method_Available::getShippingRates method):
$groups = $this->getAddress()->getGroupedAllShippingRates();
$printGroupes = array();
foreach ($groups as $code => $groupItems) {
foreach ($groupItems as $item) {
$printGroupes[$code][] = $item->getData();
}
}
Mage::log($printGroupes, null,'special.log');
Please note, that the result array with all rates will be logged into "special.log" under var/logs folder.
I wish I could be more of help, but the issue requires some digging into code, the debugger will be even more helpful than logging, if you can get hold of one.
Cheers!
Price should be entered for Flat Rate shipping to work
The problem might be of the country selection
Ship to applicable countries is set to "Specific Country" and you selected "Canada".
So you will see this shipping method only if you select Canada on the frontend during the checkout.
Or
You can make this to All Countries and check whether its working or not.