Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Just Installed Canada Post With Dimensions


Guest

Recommended Posts

I just downloaded and isntalled the Canada Post With Dimentions and did all of the required modifications. Now I am getting an error:

 

when logged in as a customer

viewing products from the shopping cart

there are no errors when viewing products not through the shopping cart

 

this error is causing the description to not show.

 

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '{3}7{2}5 and ptf.products_extra_fields_value<>'' and (pef.langu

 

SELECT pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM products_extra_fields pef LEFT JOIN products_to_products_extra_fields ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=36{3}7{2}5 and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='1') ORDER BY products_extra_fields_order

 

[TEP STOP]

 

 

EDIT: I am using MySQL 4.0.23

Link to comment
Share on other sites

Sorry I forgot to say why I was posting :)

 

I am not sure how to fix this. Dont know exactly what is causing the problem or where.

 

Thank You

Link to comment
Share on other sites

I am not sure how to fix this. Dont know exactly what is causing the problem or where.
The problem is IMO that you use attributes with the product which uses the "36{3}7{2}5" code. I think you should try and find the sql statement ....WHERE ptf.products_id= ..." and cast the whatever id it uses to an integer by putting (int) in front of it.

 

Like in this statement:

    tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "'");

Link to comment
Share on other sites

EDIT: Alright thank you.

 

When viewing the products using the standard navigation the attribs are fine but when you view them using the small side shopping cart then it has that problem.

 

Which PHP file controls that cart?

Link to comment
Share on other sites

When viewing the products using the standard navigation the attribs are fine but when you view them using the small side shopping cart then it has that problem.

 

Which PHP file controls that cart?

The file for the box (what you call small side shopping cart) is catalog/includes/boxes/shopping_cart.php. That file calls on another file: catalog/includes/classes/shopping_cart.php for its information.
Link to comment
Share on other sites

Fixed it!

 

includes/boxes/shipping_cart.php added a cast to int to the products ID before sending to tep_href_link

 

line should be:

 

$cart_contents_string .= $products[$i]['quantity'] . ' x </span></td><td valign="top" class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int) $products[$i]['id']) . '">';

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...