
Originally Posted by
dukie6675
I figured out how to define the database table in the: database_tables.php file, now I get this error:
Warning: reset() [function.reset]: Passed variable is not an array or object in /web/zen-cart/admin/includes/classes/object_info.php on line 29
Warning: Variable passed to each() is not an array or object in /web/zen-cart/admin/includes/classes/object_info.php on line 30
HTML Code:
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_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,
pra.products_min_hole
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCT_RECESS_ATTR . " pra
where p.products_id = '" . (int)$_GET['pID'] . "'
and p.products_id = pd.products_id
and p.products_id = pra.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'");
it looked like you where trying to get the id twice. the only id you need to get is p.products_id and link all others.
not sure if this will even work with out allot of other files being edited.
adding your own tables is a great idea but to edit the core files dose not make it easy when they change or up date the programing you should try to place your files in an overrides folder when you can. you should link the table where needed and make all the files you edited into a override file so you can keep your changes. otherwise you should just add the fields to your products table if you not going to do this to keep your information.
Bookmarks