Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2015-09-15 22:50:25

Gewuerz
Member
Registered: 2012-10-04
Posts: 56

Edit ApplicationHelper.php for shipping countries

Hi,

i found in the ApplicationHelper.php the list with all countries. (ttg-be/cart/application/helpers/ApplicationHelper.php)

    static function getCountryArray()
    {
        return array(
            array('code' => 'AD', 'title' => 'Andorra', 'in_eu' => 'no', 'allow_shipping' => 'yes'),
            array('code' => 'AE', 'title' => 'United Arab Emirates', 'in_eu' => 'no', 'allow_shipping' => 'yes'),
            array('code' => 'AF', 'title' => 'Afghanistan', 'in_eu' => 'no', 'allow_shipping' => 'yes'),
            array('code' => 'AG', 'title' => 'Antigua and Barbuda', 'in_eu' => 'no', 'allow_shipping' => 'yes'),
            array('code' => 'AI', 'title' => 'Anguilla', 'in_eu' => 'no', 'allow_shipping' => 'yes'),
            array('code' => 'AL', 'title' => 'Albania', 'in_eu' => 'no', 'allow_shipping' => 'yes'),
            array('code' => 'AM', 'title' => 'Armenia', 'in_eu' => 'no', 'allow_shipping' => 'yes'),
            array('code' => 'AO', 'title' => 'Angola', 'in_eu' => 'no', 'allow_shipping' => 'yes'),
            array('code' => 'AQ', 'title' => 'Antarctica', 'in_eu' => 'no', 'allow_shipping' => 'yes'),
            array('code' => 'AR', 'title' => 'Argentina', 'in_eu' => 'no', 'allow_shipping' => 'yes'),
            array('code' => 'AS', 'title' => 'American Samoa', 'in_eu' => 'no', 'allow_shipping' => 'yes'),
            array('code' => 'AT', 'title' => 'Austria', 'in_eu' => 'yes', 'allow_shipping' => 'yes'),
            array('code' => 'AU', 'title' => 'Australia', 'in_eu' => 'no', 'allow_shipping' => 'yes'),
            array('code' => 'AW', 'title' => 'Aruba', 'in_eu' => 'no', 'allow_shipping' => 'yes'),
...
...
            

Can i edit the allow_shipping from "yes" to "no"? Or can i delete any "country -lines"?
I would like to appear this some countries hide in the delivery country aim are.
If this is a possibility?

Thanks Wolfgang

Last edited by Gewuerz (2015-09-15 22:54:05)

Offline

#2 2015-09-15 23:16:40

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Edit ApplicationHelper.php for shipping countries

until Ben can chime in with a definitive answer, why not just try it and see what happens?


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2015-09-15 23:26:27

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Edit ApplicationHelper.php for shipping countries

Hi Wolfgang, I added the allow_shipping setting in anticipation of providing an interface to manage the countries that you can ship to.
We won't be building that interface in this major version of the cart.  A quick search shows that allow_shipping is used as a filter in several places, so it is likely to work as expected.  As Rod suggested, your best bet is to try it out to see how it goes.

Offline

Board footer

Powered by FluxBB