fontis / fontis_australia Goto Github PK
View Code? Open in Web Editor NEWFontis Australia extension for Magento
License: Open Software License 3.0
Fontis Australia extension for Magento
License: Open Software License 3.0
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?
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 ?
Include a composer.json definition for use with Magento Composer Installer
https://github.com/magento-hackathon/magento-composer-installer
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.
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.
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
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
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.
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]
$dataLine['dest_zip'] = str_pad($postcode, 4, "0", STR_PAD_LEFT);
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;
}
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
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!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];
}
}
Hi,
Can anyone help with this issue, have used Fontis on many sites yet i can't seem to work out the issue on this one, only get the error on shipping methods in the backend, using magento 1.9
public_html/app/code/community/Fontis/Australia/Model/Shipping/Carrier/Australiapost.php on line 66
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
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.
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->update();
And it works fine.
After changes made in issue #39 valid charge codes are now rejected.
Regards
Geoff
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.
As of 2nd April, Auspost we’ll be making some changes to the signature service in eParcel. This means that codes will change and the "isSignatureRequired" field will no longer be a Yes/No field.
Are you planning on upgrading the module to reflect these changes?
Please see below support materials:
https://auspost.com.au/content/dam/auspost_corp/media/documents/eparcel-shipping-and-tracking-fact-sheet.pdf
Cause:
Deprecated functionality: Function split() is deprecated in /home/erfan/sites/mhw/app/code/community/Fontis/Australia/Model/Shipping/Carrier/Australiapost.php on line 349
Please use preg_split or explode.
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.
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.
That's because the modman file is wrong: https://github.com/fontis/fontis_australia/blob/master/modman#L11
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>Click and send introduced a new column recently: ATL options.
It's missing from the module thus, when you import via Domestic / International the import fails as the column is not there.
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.
If you export from Magento then try to import via the Domestic/International option, the service code is missing if the shipping method is Express
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.
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
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.
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:
Deprecated functionality: Call-time pass-by-reference has been deprecated in /home/lucas/workspace/sites/kitchenwarehousenew/app/code/community/Fontis/Australia/Model/FeedCronBase.php on line 150
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.