Git Product home page Git Product logo

fontis_australia's Introduction

Fontis Australia Extension

This extension provides essential functionality for Australian stores, including Australia Post shipping, direct deposit and BPAY payment methods, and adds Australian regions and postcodes.

Further documentation is available from the Fontis Australia Extension page on our website.

Multi-Warehouse

As of 2.4.0 we added support for Multi Warehouse Extension in the eParcel Shipping Method. The eParcel rates can be specified for each of the Warehouse separately (eg. from Sydney - Warehouse ID = 1, from Melbourne Warehouse ID = 2).

The import file for eParcel rates can have one additional column for the Warehouse ID (called stock_id in code). The complete import file structure: "Country", "Region/State", "Postcodes", "Weight from", "Weight to", "Parcel Cost", "Cost Per Kg", "Delivery Type", "Charge Code Ind", "Charge Code Bus", "Warehouse ID"

Leave Warehouse ID empty when not using Multi Warehouse Extension.

Importing eParcel feeds into Australia Post

If you receive an error stating The file contains the following invalid headers, you need to ensure you have configured eParcel itself to use the correct format.

To do this:

  1. Login to eParcel
  2. Visit Administration > Merchant Location Details.
  3. Under Define Consignment CSV Import File Format, ensure that Old Consignment CSV Import File Format is checked.

australia post

Note, this should only affect new eParcel clients and not existing ones.

fontis_australia's People

Contributors

bdgeorge avatar bencorlett avatar chnorton avatar dermo666 avatar digitalpianism avatar drdrak3 avatar jonathan-dh avatar jonpday avatar lloydhazlett avatar posttechguy avatar saaslink avatar thaiphan avatar vishnub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fontis_australia's Issues

Delivery Choices API or not for Address Lookup

Your docs and comments in admin setup states that user will require a DCE Key for performing address validation lookup. which is found from the Delivery Choices api.

You will need to fill in the Australia Post Delivery Choices section to use the Australia Post address validation service.

however, speaking with austpost, they claim there is a seperate API for address lookups, and is not linked to Delivery Choices for address validation.

so, considering this: Is the Address Lookup/Validation of this module still functional, as it seems API's were changed at Austpost

Registry key already exists

a:5:{i:0;s:85:"Mage registry key "_singleton/australia/shipping_carrier_clickandsend" already exists";i:1;s:3559:"#0 /home/gooleys/public_html/dev/app/Mage.php(223): Mage::throwException('Mage registry k...')

Installed FA v3 on CE1.9 and this is what I get.

Feed Export (getprice) places special prices that are not within date range

The feed export is ignoring the Special Price date ranges.

Thus if a product is set to have a special price in the future, or if the Special Price To date is in the past, then the feed still sets the special price.

The end effect is that getprice lists the item with the special price, and not the real price.

Syntax error on v2.2.2

You've got a syntax error on one of your install scripts on version 2.2.2:

Parse error: syntax error, unexpected $end in .../app/code/community/Fontis/Australia/sql/australia_setup/mysql4-install-2.2.2.php on line 89

stock_id cannot be null SQL error mysql Ver 14.14 Distrib 5.5.38

When trying to insert without stock_id value, I get the below error

mysql Ver 14.14 Distrib 5.5.38

2015-01-12T11:11:48+00:00 DEBUG (7): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'stock_id' cannot be null, query was: INSERT INTO australia_eparcel (website_id, dest_country_id, dest_region_id, dest_zip, condition_name, condition_from_value, condition_to_value, price, price_per_kg, delivery_type, charge_code_individual, charge_code_business, stock_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

Table does not accept NULL and does not default to 0 but instead throws an error.
code/community/Fontis/Australia/sql/australia_setup/mysql4-upgrade-2.3.0-2.4.0.php
$installer->run(
"ALTER TABLE {$this->getTable('australia_eparcel')}
ADD stock_id INT NOT NULL DEFAULT '0' COMMENT 'Warehouse ID for Multi Warehouse extension';"
);

Fixed by removing NOT NULL

proc_open() calls blocked on many hosts for security reasons

This is in the feed generators, in older versions exec() was used, but both function calls are widely blocked on shared hosting accounts.

The line in question in the current version is:
https://github.com/fontis/fontis_australia/blob/master/app/code/community/Fontis/Australia/Model/FeedCronBase.php#L150

I've not yet gone through the whole thing to see what alternatives there may be, but as is the feeds don't work on hosts that have blocked these.

Inaccurate weight sent to AusPost API

Total cart weight is cast as integer in Australiapost.php meaning weights are rounded down.
In the case of weight being under 1kg (e.g. 0.9kg) it is rounded into 0 and sent to the API as the following GET request: https://auspost.com.au/api/postage/parcel/international/service?country_code=JP&weight=0 which receives a 404 status code with the following content {"error":{"errorMessage":"Please enter a valid Weight."}}.
This is an issue as international orders under 1kg would not get any shipping options (unless using other methods).
In addition, casting to integer returns less inaccurate shipping estimations, in some cases resulting in underestimation of the cost.

As a temporary solution I have switched the type to string in both Australiapost.php and auspost-php-api service.json.

Why isn't the tracking implemented for Australia Post shipping method ?

In the eparcel shipping method we can see that the tracking is properly implemented:

public function isTrackingAvailable()
    {
        return true;
    }

    public function getTrackingInfo($tracking)
    {
        $result = $this->getTracking($tracking);

        if ($result instanceof Mage_Shipping_Model_Tracking_Result) {
            if ($trackings = $result->getAllTrackings()) {
                return $trackings[0];
            }
        } elseif (is_string($result) && !empty($result)) {
            return $result;
        }

        return false;
    }

However, in the Australia Post shipping method, it's not implemented whereas it should be using the same code (as both eparcel and auspost use the same tracking url aka http://auspost.com.au/track)

So I'm wondering if there's a good reason why this is not implemented ?

frontend/base or frontend/default ?

My understanding was that since magento CE 1.4/EE 1.8 the filepath for extensions to use for their theme related files has been frontend/base/default rather than frontend/default/default, certainly whenever I install this extension I have to change that as I'm never using the default interface and so none of the frontend behaviour comes through.
(see http://www.magentocommerce.com/knowledge-base/entry/magentos-theme-hierarchy for the relevant discussion)

I see the modman file mapping does the same thing as well - so it makes sense to me to move all frontend to base/default all the time rather than rely on modman to fix it. That way the packaged version on connect will work with non-default interfaces for anyone that installs it via connect.

International shipping not working

Australia post have updated their international shipping options http://auspost.com.au/pdfs/pac-api-update-2016.pdf this is active as of the 18th April 2016. The changes to the service codes mean none of the international options are valid.

I got it working by updating the file app/code/community/Fontis/Australia/Model/Shipping/Carrier/Australiapost.php with the following function (I didn't include any of the letter options, but they are outlined in the above pdf link:

    /**
     * Returns an associative array of shipping method codes.
     *
     * @param string $type
     * @param string $code
     * @return array|bool
     */
    public function getCode($type, $code='')
    {
        /** @var Fontis_Australia_Helper_Data $helper */
        $helper = Mage::helper('australia');
        $codes = array(
            'services' => array(
                'AUS_PARCEL_COURIER'                => $helper->__('Courier Post'),
                'AUS_PARCEL_COURIER_SATCHEL_MEDIUM' => $helper->__('Courier Post Assessed Medium Satchel'),
                'AUS_PARCEL_EXPRESS'                => $helper->__('Express Post'),
                'AUS_LETTER_EXPRESS_SMALL'          => $helper->__('Express Post Small Envelope'),
                'AUS_LETTER_REGULAR_LARGE'          => $helper->__('Large Letter'),
                'AUS_PARCEL_REGULAR'                => $helper->__('Parcel Post'),

                'INT_PARCEL_COR_OWN_PACKAGING'      => $helper->__('Courier International'),
                'INT_PARCEL_EXP_OWN_PACKAGING'      => $helper->__('Express International'),
                'INT_PARCEL_STD_OWN_PACKAGING'      => $helper->__('Standard International'),
                'INT_PARCEL_AIR_OWN_PACKAGING'      => $helper->__('Economy Air International'),
                'INT_PARCEL_SEA_OWN_PACKAGING'      => $helper->__('Economy Sea International'),
            ),
            'extra_cover' => array(
                'AUS_SERVICE_OPTION_SIGNATURE_ON_DELIVERY'       => $helper->__('Signature on Delivery'),
                'AUS_SERVICE_OPTION_COURIER_EXTRA_COVER_SERVICE' => $helper->__('Standard cover')
            )
        );

        if (!isset($codes[$type])) {
            return false;
        } elseif (''===$code) {
            return $codes[$type];
        }

        if (!isset($codes[$type][$code])) {
            return false;
        } else {
            return $codes[$type][$code];
        }
    }

Feed generation error - and solution

I noticed on a fresh community 1.7.0.2 with the Fontis Australia extension that the feed generation fails on calling the "nonstatic()" method of the cron script.
The sample code from the Fontis Australia web page can be updated to call the "update()" function rather than the "nonstatic()".
I just updated the getprice generator cron code to look like this:
$model = Mage::getModel('australia/getprice_cron');

$model->nonstatic();

$model->update();

And it works fine.

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'charge_codes_individual' in 'field list' while importing csv from admin

Hello Fontis,

I have found following issue with your extension.
please change the field name either in mysql4-upgrade-2.2.1-2.2.2.php or in Eparcel.php

It is not working as expected and not importing csv files from admin config.

src/app/code/community/Fontis/Australia/sql/australia_setup/mysql4-upgrade-2.2.1-2.2.2.php

$installer->run(
"ALTER TABLE australia_eparcel"
. " ADD charge_code_individual VARCHAR( 50 ) NULL DEFAULT NULL,"
. " ADD charge_code_business VARCHAR( 50 ) NULL DEFAULT NULL"
);

src/app/code/community/Fontis/Australia/Model/Mysql4/Shipping/Carrier/Eparcel.php

line no 296

$data[] = array(
'website_id' => $websiteId,
'dest_country_id' => $countryId,
'dest_region_id' => $regionId,
'dest_zip' => $zip,
'condition_name' => $conditionName,
'condition_from_value' => $csvLine[3],
'condition_to_value' => $csvLine[4],
'price' => $csvLine[5],
'price_per_kg' => $csvLine[6],
'delivery_type' => $csvLine[7],
'charge_codes_individual' => $csvLine[8],
'charge_codes_business' => $csvLine[9]
);
Thanks
Vishnu

Feed only picking up grouped products and not simple products

The feed is running and working but I have an issue with the products it is generating in my feed.

In my store, all of my simple products are attached to grouped products and when the feed runs, it is only picking up the grouped products and not the simple products at all (only picks up the simple products if I run a test and make a simple product not attached to a group product.

Am I missing something in the set up, or is there an issue with the extension?

Fatal error in Fontis_Australia_Model_Observer.php on line 23

Manual upload to a CE1.9 build.

Fatal error: require_once(): Failed opening required '/home/gooleys/public_html/mage19/includes/src/../lib/vendor/autoload.php' (include_path='/home/gooleys/public_html/mage19/includes/src:.:/usr/lib/php:/usr/local/lib/php') in /home/gooleys/public_html/mage19/includes/src/Fontis_Australia_Model_Observer.php on line 23

Apologies if this shouldn't be logged here.

Magento 2 support

Hi @chnorton just wondering whether you had any plans to make this module (or a new version) compatible with Magento 2? Happy to collaborate as we start Mage2 projects in the next month or so just don't want to duplicate efforts.

Error on importing csv file for eParcel (v2.2.2)

On CSV import, the system.log fills up with this error and the admin silently ignores it, saying that the changes were successfully saved (which ofcourse isn't the case):

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'charge_codes_individual' in 'field list'

The error can be easily fixed if you edit the app/code/community/Fontis/Australia/Model/Mysql4/Shipping/Carrier/Eparcel.php file and change the lines 307 & 308 into:

                            'charge_code_individual' => $csvLine[8],
                            'charge_code_business' => $csvLine[9]

custom negotiated eParcel charge codes should be allowed

some customers have unique charge costs for eParcel that are not included in Fontis_Australia_Helper_Eparcel::$chargeCodes. Options to fix this are either (a) add a System Config value for "allow custom charge code" which isValidChargeCode will check if charge code is not found in the private array, or (b) use config XML rather than a private array. Option (b) this would allow developers to specify charge codes in their own module's config.xml to validate the codes uploaded by administrators are still valid.

Import of postcodes fails on v2.2.1

The SQL insert code was written based on the postcodes.txt file from v0.7 not the postcodes.csv file from v2.2.1, so if you hit the fallback of inserting postcodes rather than using LOAD DATA you crash in a big way.

I've reverted to the postcodes.txt file in this scenario, but assuming that postcodes.csv will be maintained in the future this isn't really the right way to go! Instead the csv rows should be parsed for field values to build the insert.

See: bdgeorge@1d8cfac
for my temp workaround.

Some postage option not showing

Hi,

If I add more than 3kg to Mongolia, extension not showing Standard Post postage which is available in Auspost Website.

What could be the issue?

Fontis 3.4.5
Magento 1.9.3.6

Thank you.

CSV Import converts wildcard postcodes to '0000' but shipping method checks for blank fields

  1. Using basic import sheet with flat rate across all Aus: https://docs.google.com/spreadsheet/ccc?key=0Ah9guw-GP4jBdG5TVzRfU1RJZUdXeDl2VlVpa3Z4THc
  2. Line 326 of Fontis_Australia_Model_Mysql4_Shipping_Carrier_Eparcel::uploadAndImport() converts wildcard postcodes to '0000'.
$dataLine['dest_zip'] = str_pad($postcode, 4, "0", STR_PAD_LEFT);
  1. However there is no check for this four-zero postcode when searching for applicable methods - see line 61 of Fontis_Australia_Model_Mysql4_Shipping_Carrier_Eparcel::getRate()
switch($j) {
                case 0:
                    $select->where(
                        $read->quoteInto(" (dest_country_id=? ", $request->getDestCountryId()).
                            $read->quoteInto(" AND dest_region_id=? ", $request->getDestRegionId()).
                            $read->quoteInto(" AND dest_zip=?) ", $postcode)
                        );
                    break;
                case 1:
                    $select->where(
                       $read->quoteInto("  (dest_country_id=? ", $request->getDestCountryId()).
                            $read->quoteInto(" AND dest_region_id=? AND dest_zip='') ", $request->getDestRegionId())
                       );
                    break;

                case 2:
                    $select->where(
                       $read->quoteInto("  (dest_country_id=? AND dest_region_id='0' AND dest_zip='') ", $request->getDestCountryId())
                    );
                    break;
                case 3:
                    $select->where(
                        $read->quoteInto("  (dest_country_id=? AND dest_region_id='0' ", $request->getDestCountryId()).
                        $read->quoteInto("  AND dest_zip=?) ", $postcode)
                        );
                    break;
                case 4:
                    $select->where(
                            "  (dest_country_id='0' AND dest_region_id='0' AND dest_zip='')"
                );
                    break;
            }

Autocomplete Country ajax request parameter should update when country select has changed

The code currently only set the parameter to the initial value of the Shipping/Billing country. It should update each time the country is changed. I took the liberty of fixing. Here is the updated postcode-checkout.phtml

isPostcodeAutocompleteEnabled()): ?> <script type="text/javascript"> var citySuggestUrl = 'helper('australia')->getCitySuggestUrl(); ?>'; //============ Billing ============// var autocomplete_city_billing = new Element('div', { id: 'autocomplete_city_billing', 'class': 'fontis-postcode-autocomplete' }); var billing_completer; var shipping_completer; if ($('billing:city')) { $('billing:city').parentNode.appendChild(autocomplete_city_billing); function updateAddressBilling(text, item) { // Update state and postcode fields var id = item.id; var tokens = id.split('-'); // Assume item at index 1 is region_id, item at index 3 is postcode $('billing:region_id').value = tokens[1]; $('billing:postcode').value = tokens[3]; } // Create the autocompleter and assign it to a variable for future use. billing_completer = new Ajax.Autocompleter("billing:city", "autocomplete_city_billing", citySuggestUrl, { afterUpdateElement: updateAddressBilling, minChars: 2, parameters: 'country=' + $F('billing:country_id') }); } $('billing:country_id').observe('change', function(event) { billing_completer.options.defaultParams = 'country=' + $F('billing:country_id'); }); //============ Shipping ============// var autocomplete_city_shipping = new Element('div', { id: 'autocomplete_city_shipping', 'class': 'fontis-postcode-autocomplete' }); if ($('shipping:city')) { $('shipping:city').parentNode.appendChild(autocomplete_city_shipping); function updateAddressShipping(text, item) { // Update state and postcode fields var id = item.id; var tokens = id.split('-'); // Assume item at index 1 is region_id, item at index 3 is postcode $('shipping:region_id').value = tokens[1]; $('shipping:postcode').value = tokens[3]; } // Create the autocompleter and assign it to a variable for future use. shipping_completer = new Ajax.Autocompleter("shipping:city", "autocomplete_city_shipping", citySuggestUrl, { afterUpdateElement: updateAddressShipping, minChars: 2, parameters: 'country=' + $F('shipping:country_id') }); } $('shipping:country_id').observe('change', function(event) { shipping_completer.options.defaultParams = 'country=' + $F('shipping:country_id'); }); </script>

Development and Testing Script on Fontis site does not work for newer version of feeds

I have updated to the lastest version of Fontis Australia and wanted to run the cron for the feeds before the midnight set run time. Tried to run this as per your website:

nonstatic(); // Initialise and trigger the GetPrice feed $model = Mage::getModel('australia/getprice_cron'); $model->nonstatic(); // Initialise and trigger the Shopbot feed $model = Mage::getModel('australia/shopbot_cron'); $model->nonstatic(); This now doesn't work. It comes up with the following error: PHP Fatal error: Call to undefined method Fontis_Australia_Model_MyShopping_Cron::nonstatic() in /path/to/magento/feed.php on line 12 Are you able to update this script so that we can run it if needed to kick start the cron for feeds prior to the midnight setting? Thanks!

Parse Error

Parse error: syntax error, unexpected ':' in app/code/community/Fontis/Australia/Model/Shipping/Carrier/Eparcel.php on line 131

if ($isBusinessCustomer) {
return $rate['charge_code_business'] ?:
Mage::getStoreConfig('doghouse_eparcelexport/charge_codes/default_charge_code_business');
}
else {
return $rate['charge_code_individual'] ?:
Mage::getStoreConfig('doghouse_eparcelexport/charge_codes/default_charge_code_individual');
}

shouldn't it be

if ($isBusinessCustomer) {
return $rate['charge_code_business'] ? $rate['charge_code_business'] :
Mage::getStoreConfig('doghouse_eparcelexport/charge_codes/default_charge_code_business');
}
else {
return $rate['charge_code_individual'] ? $rate['charge_code_business'] :
Mage::getStoreConfig('doghouse_eparcelexport/charge_codes/default_charge_code_individual');
}

Thanks

Guzzle/Guzzle

will you be updating to remove its requirement on Guzzle/guzzle? as it is depreciated now?

im getting this error any idea?

2017-04-03T17:10:06+00:00 ERR (3):
Guzzle\Http\Exception\ClientErrorResponseException: Client error response
[status code] 404
[reason phrase] Not Found
[url] https://digitalapi.auspost.com.au/postage/parcel/domestic/service?from_postcode=3033&to_postcode=2320&length=20&width=20&height=20&weight=31.5 in /home/globalgs/public_html/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/BadResponseException.php:43
Stack trace:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.