WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: svsanchez on May 22, 2015, 08:00:40 PM

Title: Accepting orders from anywhere but shipping only to a single country
Post by: svsanchez on May 22, 2015, 08:00:40 PM
Hello everyone.

I need to configure Bakery so that it allows people from anywhere in the world to make a purchase, but limit the shipping only to Guatemala. The reason for this is there are about 2 million Guatemalans living abroad but their families live in Guatemala, so they need to buy from the country they live in and have the product delivered to their loved ones here.

How can I do this? I am using Bakery 1.6
Title: Re: Accepting orders from anywhere but shipping only to a single country
Post by: freeSbee on May 23, 2015, 08:34:22 PM
Hi svsanchez

Use the customer address form (invoice) and the shipping address form:
http://www.bakery-shop.ch/#shipping_address

For the customer address form modify the country list at /modules/bakery/languages/countries/ES.php

If you want to limit shipping to Guatemala only, modify the country select of the shipping address form. Search the code below (view_form.php about line 358):
Code: [Select]
// Prepare ship country options
for ($n = 1; $n <= count($MOD_BAKERY['TXT_COUNTRY_NAME']); $n++) {
and replace it by
Code: [Select]
// Prepare ship country options
$MOD_BAKERY['TXT_COUNTRY_CODE'] = array(); $MOD_BAKERY['TXT_COUNTRY_NAME'] = array();
$MOD_BAKERY['TXT_COUNTRY_CODE'][1] = 'GT'; $MOD_BAKERY['TXT_COUNTRY_NAME'][1] = 'Guatemala';
for ($n = 1; $n <= count($MOD_BAKERY['TXT_COUNTRY_NAME']); $n++) {

Regards Christoph