AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: Karlos on February 03, 2014, 06:51:28 PM

Title: Unable to deselect shipping to other countries
Post by: Karlos on February 03, 2014, 06:51:28 PM
Hi all,
I am in England and only want to deliver to England at the moment.  I have gone to localization/countries and turned a few of the other countries status to off.  I have cleared the cache, but everytime I go to the cart all the countries are still there !

Can anyone help ?

Thanks

Title: Re: Unable to deselect shipping to other countries
Post by: abantecart on February 03, 2014, 11:48:38 PM
Hmm. Interesting. Small bug,

Here is a fix:

Open file: storefront/model/localisation/country.php

Locate following line around line 50:

Code: [Select]
    $query = $this->db->query( "SELECT *
    FROM " . $this->db->table("countries") . " c
    LEFT JOIN " . $this->db->table("country_descriptions") . " cd
    ON (c.country_id = cd.country_id AND cd.language_id = '" . (int)$language_id . "')
    ORDER BY cd.name ASC");
   

Replace with
Code: [Select]
    $query = $this->db->query( "SELECT *
    FROM " . $this->db->table("countries") . " c
    LEFT JOIN " . $this->db->table("country_descriptions") . " cd
    ON (c.country_id = cd.country_id AND cd.language_id = '" . (int)$language_id . "')
    WHERE c.status = '1'
    ORDER BY cd.name ASC");
Title: Re: Unable to deselect shipping to other countries
Post by: Karlos on February 04, 2014, 02:09:35 PM
Many thanks for your reply, this sorted it out! :)