Zen Cart Logo
Forums / Addon Shipping Modules / Australia Post Module problem - "unknown column p.products_height"

Australia Post Module problem - "unknown column p.products_height"

Locked

Views: 9,342

Results 1 to 20 of 46
This thread is locked. New replies are disabled.
16 May 2007, 3:41 PM
#1
dail avatar

dail

New Zenner

Join Date:
May 2007
Location:
Brisbane, Qld Australia
Posts:
8
Plugin Contributions:
0

Australia Post Module problem - "unknown column p.products_height"

I am new to Zen Cart and had several items in testing and setting up the cart. I added the Australia post module now I cannot get access to the products again. Comes up with string of errors. It appears that the then new module has added fields for size and weight components that were not entered prior to adding items.
How can I fix this without deleting items and starting over?

20 May 2007, 4:55 AM
#2
dail avatar

dail

New Zenner

Join Date:
May 2007
Location:
Brisbane, Qld Australia
Posts:
8
Plugin Contributions:
0

Re: Australia Post Module problem - "unknown column p.products_height"

Does anyone know how to fix this issue. I think it was created by the Aus Post Module?
1054 Unknown column 'p.products_height' in 'field list'
in:
[select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_virtual, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id, p.products_height,p.products_length, p.products_width, p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute, p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping, p.products_qty_box_status, p.products_quantity_order_max, p.products_sort_order, p.products_discount_type, p.products_discount_type_from, p.products_price_sorter, p.master_categories_id from zen_products p, zen_products_description pd where p.products_id = '2' and p.products_id = pd.products_id and pd.language_id = '1']
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.

22 May 2007, 4:38 AM
#3
dail avatar

dail

New Zenner

Join Date:
May 2007
Location:
Brisbane, Qld Australia
Posts:
8
Plugin Contributions:
0

Re: Australia Post Module problem - "unknown column p.products_height"

Doesn't help as error is there days after the event and backspace history is gone.

22 May 2007, 6:21 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Australia Post Module problem - "unknown column p.products_height"

dail:

I am new to Zen Cart and had several items in testing and setting up the cart. I added the Australia post module now I cannot get access to the products again. Comes up with string of errors. It appears that the then new module has added fields for size and weight components that were not entered prior to adding items.
How can I fix this without deleting items and starting over?

dail:

Does anyone know how to fix this issue. I think it was created by the Aus Post Module?
1054 Unknown column 'p.products_height' in 'field list'

I know nothing about the auspost module, but if you had to install PHP files that now ask for new fields in the database .... but you didn't install the database updates so that those fields are available ... then it makes sense that you'd get errors like "field doesn't exist".

So ... was there a readme with the module? Did it tell you to run some database/SQL commands? Was there a .sql file in the module files? Did you run it on your database? If you didn't, then ... you need to.

22 May 2007, 12:35 PM
#5
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Australia Post Module problem - "unknown column p.products_height"

dail, DrByte,
This is a bug caused by the AustPost module V1.3. I've been waiting for the last couple of days for one of the people I emailed the fix to to confirm that it is indeed fixed. I'm pretty confident it is, but I've still no confirmation, so I've uploaded the updated version (v1.4) to the downloads area anyway.

DrByte, FYI, the installation process updates the tables - well it should have done <embarrasement mode on> I was using a hardcoded table name during development and ended up forgetting to replace it with the predefined constant prior to release, as such, those using table prefixes ended up with a broken system<embarassment mode off>.

Note: To get the best out of this module a couple of the admin files have also been updated <optional>. The included README file gives full details about this (it adds dimensions to products to cater for 'cubing' rules).

dail, if you wish to recover your system before the update is made avialable simply revert the changed files in the /admin/ directory. (if you didn't back them up first, just replace the relevent files from a default zencart install.
Only two files are affected, collect_info.php and update_product.php

Cheers
Rod

23 May 2007, 5:35 AM
#6
dail avatar

dail

New Zenner

Join Date:
May 2007
Location:
Brisbane, Qld Australia
Posts:
8
Plugin Contributions:
0

Re: Australia Post Module problem - "unknown column p.products_height"

Thanks for your help Rod, I thought I was going mad. I did replace the 2 files and it did not fix the problem, the error still existed. I then deleted the whole installation and reinstalled zen cart and restored the data and all came good again. I can't understand why by replacing he 2 files the error still existed after reading your comments.
I will try installing v 1.4 now.

23 May 2007, 7:10 AM
#7
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Australia Post Module problem - "unknown column p.products_height"

I will try installing v 1.4 now

<big sigh>. Sorry dail, V1.4 is still broken. I'll be uploading V1.4.1 shortly.

Cheers
Rod

23 May 2007, 7:23 AM
#8
romy avatar

romy

New Zenner

Join Date:
May 2007
Location:
york, pa
Posts:
98
Plugin Contributions:
0

Re: Australia Post Module problem - "unknown column p.products_height"

Does anyone have the answer to this..
want to add t-shirt sizes and color choices to my options and get this error..
Option Values
1054 Unknown column 'pov.products_options_values_quantity' in 'field list'
in:
[select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_quantity, pov2po.products_options_id, pov.products_options_values_sort_order from cart1_products_options_values pov left join cart1_products_options_values_to_products_options pov2po on pov.products_options_values_id = pov2po.products_options_values_id left join cart1_products_options po on pov2po.products_options_id = po.products_options_id where pov.language_id = '1' and pov2po.products_options_values_id !='0' order by po.products_options_name, LPAD(pov.products_options_values_sort_order,11,'0'), pov.products_options_values_name]
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.

I am working with the current zencart.

24 May 2007, 2:45 AM
#9
dail avatar

dail

New Zenner

Join Date:
May 2007
Location:
Brisbane, Qld Australia
Posts:
8
Plugin Contributions:
0

Re: Australia Post Module problem - "unknown column p.products_height"

I think you have the same problem I had. Go back to the redme.txt file that came with the module and you will probably find that you have to add several lines of code to several files. Hope it works out for you.

25 May 2007, 12:15 AM
#10
dail avatar

dail

New Zenner

Join Date:
May 2007
Location:
Brisbane, Qld Australia
Posts:
8
Plugin Contributions:
0

Re: Australia Post Module problem - "unknown column p.products_height"

I installed V1.5, I changed the 2 files but on a new install of ZEN CART there was only the first file that had to be modified then other already had the mods in it for weight, height, length etc.
When I added a product the folling occurred. The URL
http://www.plaza.com.au/hits/admin/product.php?cPath=3_4&product_type=1&action=insert_product

Result: Parse error: syntax error, unexpected '.' in /home/plaza/public_html/hits/admin/includes/modules/update_product.php on line 31

Line 31 for the File update_product.php:
$tmp_value = zen_db_prepare_input($_POST['products_weight']);
$products_weight = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;

25 May 2007, 1:50 AM
#11
romy avatar

romy

New Zenner

Join Date:
May 2007
Location:
york, pa
Posts:
98
Plugin Contributions:
0

Re: Australia Post Module problem - "unknown column p.products_height"

dail:

I think you have the same problem I had. Go back to the redme.txt file that came with the module and you will probably find that you have to add several lines of code to several files. Hope it works out for you.

Hi dail
do you mean in the docs folder 1.readme_installation

Read the readme _installation file and it is all done.
Still get the message..

25 May 2007, 4:19 AM
#12
peta_c avatar

peta_c

New Zenner

Join Date:
May 2007
Posts:
1
Plugin Contributions:
0

Re: Australia Post Module problem - "unknown column p.products_height"

Hi

I really like this module. I have just installed 1.5 and noticed a problem which I think relates to the database table prefix issue - when calculating shipping rather than when installing the module.

In includes/modules/shipping/austpost.php, lines 97 and 123, the sql statement refers directly to the table "products" without any prefix. This caused an error but when I added zen_ in front of this and uploaded the file, the problem went away.

Has anyone else noticed this?

Peta

25 May 2007, 4:40 AM
#13
dail avatar

dail

New Zenner

Join Date:
May 2007
Location:
Brisbane, Qld Australia
Posts:
8
Plugin Contributions:
0

Re: Australia Post Module problem - "unknown column p.products_height"

Not sure then, the only other way I got rid of it was to backup the site using the backup sql module and delete the shop reinstall it and tehn restore database.

25 May 2007, 5:13 AM
#14
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Australia Post Module problem - "unknown column p.products_height"

romy.
I've no idea what your problem is, but I do know that it has nothing to do with the AustPost module. Please take a close look at the errors that you are getting compared with those that dail is getting. dails problem is definiely related to the austpost module (products_length, width & height), wherease your is related to products_options & option values.

dail..

I changed the 2 files but on a new install of ZEN CART there was only the
first file that had to be modified then other already had the mods in it for
weight, height, length etc.

A new zencart install does not have anything relating to product dimensions.
There are two files in /admin/ that have been modded (and these are purely optional anyway, as long as you don't mind all of your products having the same defualt dimensions.

When I added a product the folling occurred. The URL
http://www.plaza.com.au/hits/admin/p...sert _product
Result: Parse error: syntax error, unexpected '.'
in /home/plaza/public_html/hits/admin/includes/modules/update_product.php
on line 31

Did you patch these files yourself, or did you use the pre-patched files that are in the .zip file? If you needed to patch them youself carefully check the syntax (what I did was to copy and modify lines 25&26 of the original file).

If you are using the pre-patched files I really don't have a clue what would be causing this error - an even bigger mystery is that

$tmp_value = zen_db_prepare_input($_POST['products_weight']);

is actually original unmodified zencart code - in fact if you read the 'weights.txt' file in the Austpost.zip file you see that I explicitly state that weights are NOT a function of the austpost module - the austpost module doesn't even reference the weight field in any way, so there is no reason that I can think of what you would be getting this error.

Cheers
Rod

25 May 2007, 5:23 AM
#15
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Australia Post Module problem - "unknown column p.products_height"

peta_c,

In includes/modules/shipping/austpost.php, lines 97 and 123, the sql
statement refers directly to the table "products" without any prefix.
This caused an error but when I added zen_ in front of this and uploaded
the file, the problem went away.

Has anyone else noticed this?

I think you'll be the first... mainly because all versions between V1.2 and v1.5 have had a related problem that prevented it from installing correctly when table prefixes were in use. The fact that you have got past the install stage and now found this other problem means that I have finally solved the installation issue.

Anyway, now that I know about this problem I'll take care of it ASAP.
(my search/replace should have picked that up - sorry about that).

Cheers
Rod

25 May 2007, 9:06 PM
#16
romy avatar

romy

New Zenner

Join Date:
May 2007
Location:
york, pa
Posts:
98
Plugin Contributions:
0

Re: Australia Post Module problem - "unknown column p.products_height"

Still no luck with :unsure:
1054 Unknown column 'pov.products_options_values_quantity' in 'field list'
in:
[select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_quantity, pov2po.products_options_id, pov.products_options_values_sort_order from cart1_products_options_values pov left join cart1_products_options_values_to_products_options pov2po on pov.products_options_values_id = pov2po.products_options_values_id left join cart1_products_options po on pov2po.products_options_id = po.products_options_id where pov.language_id = '1' and pov2po.products_options_values_id !='0' order by po.products_options_name, LPAD(pov.products_options_values_sort_order,11,'0'), pov.products_options_values_name]
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.

I still get this error....I read the 1.readme_installation.html and did what i hade to do...Been on this for a couple of days and it is rrrrrrr.....
This is the site https://www.pirateguild.biz
plus my images will not show up when they are clicked....what is that all about.
If any advice please let me know ...thanks

26 May 2007, 2:52 AM
#17
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Australia Post Module problem - "unknown column p.products_height"

Romy, you will not have any luck trying to solve your problem by following the austpost module threads. You have a totally different problem.

Still no luck with
1054 Unknown column 'pov.products_options_values_quantity' in 'field list'
in:
[select pov.products_options_values_id, pov.products_options_values_name,

What modules relating to products options have you installed recently?

Rod

26 May 2007, 2:58 AM
#18
romy avatar

romy

New Zenner

Join Date:
May 2007
Location:
york, pa
Posts:
98
Plugin Contributions:
0

Re: Australia Post Module problem - "unknown column p.products_height"

Thanks for the help,
product_info_mod_left_side_1.0 ...this is the current mod install.
Before this it still did not work.

26 May 2007, 3:41 AM
#19
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Australia Post Module problem - "unknown column p.products_height"

What was the last thing you installed before it stopped working?

29 Jul 2007, 12:21 PM
#20
theslydog avatar

theslydog

New Zenner

Join Date:
May 2007
Posts:
10
Plugin Contributions:
0

Re: Australia Post Module problem - "unknown column p.products_height"

I think you will find this is a conflict between the 2 Australian post modules.

If you installed the earlier module 'Australia Post Module' and loaded some products and then switched to the 'AustPost improved' you will get these errors. You will need to turn back on the 'Australia Post Module' to view these products.

Don't really know another fix at this stage.