Forums / All Other Contributions/Addons / 1054 Unknown column 'p.product_price_w' in 'field list'

1054 Unknown column 'p.product_price_w' in 'field list'

Started by stevefriedman71 on 2 Mar 2011, 10:14 PM · Views: 4,073

Results 21 to 26 of 26
3 Mar 2011, 11:42 PM
#21
drbyte avatar

drbyte

Sensei

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

1054 Unknown column 'p.product_price_w' in 'field list'

Don't worry about the "p." prefix. That's just an alias to avoid having to write out "products." as the table name.

The thing to be concerned about is the difference between "product**s**_price_w" and "product_price_w".
Looks like sloppy coding in the addon.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Mar 2011, 11:43 PM
#22
drbyte avatar

drbyte

Sensei

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

Re: 1054 Unknown column 'p.product_price_w' in 'field list'

The product "preview" page in the admin is handled by the files under /admin/includes/modules/ folder. Whichever files were in that folder in the addon you installed are likely the offending ones.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Mar 2011, 12:15 AM
#23
stevefriedman71 avatar

stevefriedman71

Zen Follower

Join Date:
Sep 2006
Posts:
269
Plugin Contributions:
0

Re: 1054 Unknown column 'p.product_price_w' in 'field list'

in the amin/includes/modules i have 3 instances. one in the page
product/collect_info.php

if (isset($_GET['pID']) && empty($_POST)) {
$product = $db->Execute("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_price_w, 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_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 " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_id = '" . (int)$_GET['pID'] . "'
and p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'");

and 2 instances in category/product_listing.php

$products_query_raw = ("select p.products_type, p.products_id, pd.products_name, p.products_quantity,
p.products_image, p.products_price, p.products_price_w, p.products_date_added,
p.products_last_modified, p.products_date_available,
p.products_status, p2c.categories_id,
p.products_model,
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_quantity_order_max, p.products_sort_order,
p.master_categories_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, "
. TABLE_PRODUCTS_TO_CATEGORIES . " p2c
where p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and (p.products_id = p2c.products_id
and p.master_categories_id = p2c.categories_id)
and (
pd.products_name like '%" . zen_db_input($_GET['search']) . "%'
or pd.products_description like '%" . zen_db_input($_GET['search']) . "%'
or p.products_id = '" . zen_db_input($_GET['search']) . "'
or p.products_model like '%" . zen_db_input($_GET['search']) . "%')" .
$order_by);

$products_query_raw = ("select p.products_type, p.products_id, pd.products_name, p.products_quantity,
p.products_image, p.products_price, p.products_price_w, p.products_date_added,
p.products_last_modified, p.products_date_available,
p.products_status, p.products_model,
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_quantity_order_max, p.products_sort_order
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
where p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_id = p2c.products_id
and p2c.categories_id = '" . (int)$current_category_id . "'" .
$order_by);

i hope this is helpful

4 Mar 2011, 12:28 AM
#24
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: 1054 Unknown column 'p.product_price_w' in 'field list'

In the Tools ... Developers Tool Kit ... do a search in the bottom input box on:
product_price_w

Select Catalog/Admin and click search ...

How many files use it?

Next, do a search on:
products_price_w

How many files use it?

All files should be using the one method of spelling the fields name ...

I am thinking that the spelling:
products_price_w

is the correct one and where you see:
product_price_w

are errors and need to be corrected ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

4 Mar 2011, 1:15 AM
#25
stevefriedman71 avatar

stevefriedman71

Zen Follower

Join Date:
Sep 2006
Posts:
269
Plugin Contributions:
0

Re: 1054 Unknown column 'p.product_price_w' in 'field list'

thank you... that actually did it. you have been right. there where over 900 for "products" and only ONE for product.
for all that have the same issue. you need to go to
admin/includes/modules/product/preview_info.php around line 19

p.products_model, p.products_image, p.products_price, p.product_price_w, p.products_virtual,

and change that to

p.products_model, p.products_image, p.products_price, p.products_price_w, p.products_virtual,

that solved, off to the next issue :) YAYYYY:frusty:

I am so grateful to all of you helping here and spending time to make this cart what it is...

4 Mar 2011, 1:18 AM
#26
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: 1054 Unknown column 'p.product_price_w' in 'field list'

Thanks for the update and for posting what the solution was that you discovered to fix this ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!