Re: ozpost shipping module
Hi Rod. I have 1.3.9h, trying to update ozpost but when I click it in shipping modules, it renames the file and then throws the following error:
*********************************************
1146 Table 'information_schema.tables' doesn't exist
in:
[SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'becker' AND table_name = 'main_ozpost_cache';]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
*********************************************************************
When this happens I can't get to the uninstall button as the page crashes. I rename the file via FTP and the same thing happens. Any ideas?
Thanks!
Re: ozpost shipping module
I tried adding the table using the code from ozpost.php
*******
CREATE TABLE " . TABLE_OZPOST_CACHE . "(
`cache_entry_name` varchar(64) NOT NULL DEFAULT '',
`cache_data` mediumblob,
`cache_entry_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`cache_entry_name`))") ;
**********
Added the table OK but still getting the problem. Help?
Re: ozpost shipping module
Quote:
Originally Posted by
slobadog
I tried adding the table using the code from ozpost.php
*******
CREATE TABLE " . TABLE_OZPOST_CACHE . "(
`cache_entry_name` varchar(64) NOT NULL DEFAULT '',
`cache_data` mediumblob,
`cache_entry_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`cache_entry_name`))") ;
**********
Added the table OK but still getting the problem. Help?
Open /includes/modules/shipping/ozpost.php into a text editor.
Search for 'schema'. This is only found on one line. Delete (or comment out) this line of code, as well as the line that follows. ( starts with 'if ($res->fields ....)
Resave the file.
Cheers
Rod.
PS. This a a rare issue. I've only heard of one other case. The cause is the missing 'information_schema.tables' table. It shouldn't be missing. My 'fix' will take care of your immediate problem, but not the underlying cause that will probably have other side effects that you aren't aware of yet.
Re: ozpost shipping module
Thanks Rod. Had a little trouble installing the update. For a reason I couldn't determine, ozpost.php couldn't resolve the define DIR_WS_TEMPLATES. It was inserting it literally instead of resolving to DIR_WS_INCLUDES . 'templates/.
EG. USR/HOME/DIR/DIR_WS_TEMPLATEStemplate_default/templates
I got it working by redefining 'DIR_WS_TEMPLATES' with
Code:
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
at both lines 2569 and 3238 of ozpost.php. I now have it working except for the shipping estimator. If a weight is set to zero, it defaults to 1000kg! I guess I'll have to tidy up all the customers products...
Thanks for your help, the great support and a great mod.
Re: ozpost shipping module
Quote:
Originally Posted by
slobadog
For a reason I couldn't determine, ozpost.php couldn't resolve the define DIR_WS_TEMPLATES. It was inserting it literally instead of resolving to DIR_WS_INCLUDES . 'templates/. .
This is another known problem. I did have this taken care of at one stage but I appear to have unfixed it again with the latest update. :(
Quote:
Originally Posted by
slobadog
I got it working by redefining 'DIR_WS_TEMPLATES' with
Code:
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
at both lines 2569 and 3238 of ozpost.php.
A better place for this will be in the configure.php file(s), because that is where they are missing from. This suggests that you are either using an old version of ZenCart, or, your configure.php files haven't been updated along with the rest of the store.
Quote:
Originally Posted by
slobadog
I now have it working except for the shipping estimator. If a weight is set to zero, it defaults to 1000kg! I guess I'll have to tidy up all the customers products...
Before doing anything with the products, the zero = 1000kg are ozpost settings.
The 'kg/gms' switch determines if this value is 1000kg, or 1kg (1000gms).
The value itself is a merchant defined ozpost setting, and is the default weight used if a product doesn't have its own weight assigned. (This is new to V3.5.1)
There is also another ozpost setting that causes products with zero weights to behave in different ways. The default behaviour is to use the weight determined by the weight/kgs/gm settings, but, it can also be set to ignore products with a zero weight (effectively giving the product(s) free shipping), OR, it can be set to produce a 'Contact store owner for shipping costs' type message if a zero weight product is added to the cart. (Also new to V3.5.1)
As for the customers products, there is one simple rule. Accurate weights *and* dimensions = accurate quotes.
Although the weights are generally the most significant factor as far as costs are concerned, the ozpost module attempts to quote using the smallest sized 'standard' package possible for any given quote (envelopes, satchels & boxes). It can only calculate the correct sized package if the items also have correct dimensions.
A common 'trap' is in thinking a 300gm item will fit into a 500gm satchel. Quite often, although the weight is suitable, the physical size of the item(s) may preclude the use of a 500gm satchel, in which case the ozpost module will quote on the next sized satchel that does fit (if at all). Again, correct dimensions are essential for this to function correctly.
Cheers
Rod
Re: ozpost shipping module
Quote:
A better place for this will be in the configure.php file(s)
It actually is there. I tried simply redefining it at the top of ozpost.php but it still broke, I had to put it in the two lines mentioned to get it to work. Thanks for the extra info RE weights and dimensions, I'll get those too. I realise it needs updating but I had to modify so many core files, it's a bit of a pain.
Happy days, I can now have a glass of red...
Re: ozpost shipping module
Quote:
Originally Posted by
slobadog
It actually is there.
Strange. I wonder why it isn't getting used?
Quote:
Originally Posted by
slobadog
I tried simply redefining it at the top of ozpost.php but it still broke,.
I realise you've already overcome the problem, but for reference, the 'fix' that I use in the ozpost module (because permissions prevent modification of the configure.php file(s) is similar to line#226 of the ozpost.php file. Essentially the same 'define' that you are currently using, but with an 'if not defined' test, so that it only gets set by the ozpost module if it hasn't already been pre-defined elsewhere.
Cheers
Rod
Re: ozpost shipping module
Hi Rod
I am using V3.5.1 of Ozpost.
Since the Australia Post changes I have noticed that Express Post envelopes are not giving the correct price in the Ozpost module.
It charges the customer $5.25 but the actual cost is $5.80 (Small Express Post Envelope up to 125g and 20cm wide). On the Australia Post website I can not find any reference to a $5.25 option.
Robyn
Re: ozpost shipping module
Quote:
Originally Posted by
robbie269
Express Post envelopes are not giving the correct price in the Ozpost module.
All should be OK now. There was an error in the data tables.
I've extended your subscription by another month in way of compensation and to say thanks for reporting the problem.
Cheers
Rod
Re: ozpost shipping module
Quote:
Originally Posted by
RodG
All should be OK now. There was an error in the data tables.
I've extended your subscription by another month in way of compensation and to say thanks for reporting the problem.
Cheers
Rod
Thanks Rod :smile: