Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Custom Product Builder of OSc BS


LeeFoster

Recommended Posts

  • 3 weeks later...

Getting these errors when trying to update /admin/builder_categories.php?action=update

Quote

Warning: Use of undefined constant editid - assumed 'editid' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 30

Warning: Use of undefined constant editoscat - assumed 'editoscat' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 31

Warning: Use of undefined constant editimage - assumed 'editimage' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 32

Warning: Use of undefined constant newdepcat - assumed 'newdepcat' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 33

Warning: Use of undefined constant editid - assumed 'editid' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 30

Warning: Use of undefined constant editoscat - assumed 'editoscat' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 31

Warning: Use of undefined constant editimage - assumed 'editimage' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 32

Warning: Use of undefined constant newdepcat - assumed 'newdepcat' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 33

Warning: Use of undefined constant editid - assumed 'editid' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 30

Warning: Use of undefined constant editoscat - assumed 'editoscat' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 31

Warning: Use of undefined constant editimage - assumed 'editimage' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 32

Warning: Use of undefined constant newdepcat - assumed 'newdepcat' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 33

Warning: Use of undefined constant newrow - assumed 'newrow' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 53

Warning: Use of undefined constant neworder - assumed 'neworder' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 54

Warning: Use of undefined constant newimage - assumed 'newimage' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 55

Warning: Use of undefined constant newoscat - assumed 'newoscat' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 56

Warning: Use of undefined constant delrow - assumed 'delrow' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 76

Warning: Use of undefined constant fromrow - assumed 'fromrow' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 135

Warning: Use of undefined constant torow - assumed 'torow' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 136

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\valley\admin\builder_categories.php:136) in C:\xampp\htdocs\valley\admin\includes\functions\general.php on line 38

 

Link to comment
Share on other sites

3 hours ago, LeeFoster said:

Warning: Use of undefined constant editid - assumed 'editid' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 30

Warning: Use of undefined constant editoscat - assumed 'editoscat' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 31

Warning: Use of undefined constant editimage - assumed 'editimage' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 32

Warning: Use of undefined constant newdepcat - assumed 'newdepcat' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\valley\admin\builder_categories.php on line 33

Fixed this issue, update attached

Custom-Product-Builder-for-BS-Tsimi.zip

Edited by LeeFoster
Link to comment
Share on other sites

Just had a look with Chrome (v67.0.3396.99), no issues either. I can select items.

6.5 inch base plate?? That is not a vanilla osC product. Did you try it with regular osC products like DVDs?

However I do get an error inside the Builder box on the catalog side. My guess would be another PHP 7.2 related issue.

Quote

Warning: Use of undefined constant cpb_product_builder_name - assumed 'cpb_product_builder_name' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\frozen2\includes\modules\boxes\templates\builder.phpon line 4

 

Edited by Tsimi
Link to comment
Share on other sites

14 minutes ago, Tsimi said:

Just had a look with Chrome (v67.0.3396.99), no issues either. I can select items.

6.5 inch base plate?? That is not a vanilla osC product. Did you try it with regular osC products like DVDs?

However I do get an error inside the Builder box on the catalog side. My guess would be another PHP 7.2 related issue.

 

You're right,  it appears to be an issue with my product. 

Note to self - 'Don't use " in product description'

The other error I have fixed, there is an instance of cpb_product_builder_name that is missing ' ' around it.

Edited by LeeFoster
Link to comment
Share on other sites

  • 3 months later...
On 11/13/2018 at 10:32 AM, LeeFoster said:

Anyone interested in getting this fully working? @Tsimi @raiwa

Interested, yes, time to do it, no. Maybe next month, maybe next year 🙄

Link to comment
Share on other sites

From what I can tell we just need to make the last manual change  hard coded.

Quote

$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
  $product_check = tep_db_fetch_array($product_check_query);

## REPLACE WITH:

// BUILDER INTERVENTION - redirect to builder_product_info if this is a builder product
  $product_check_query = tep_db_query("select p.builder_product_flag, count(*) as total from products p, products_description pd where (p.products_status = '1' or p.builder_product_flag = '1') and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' group by p.products_id");
  $product_check = tep_db_fetch_array($product_check_query);
if ($product_check['builder_product_flag'] == '1') {
    tep_redirect(tep_href_link('builder_product_info.php?products_id=' . $_GET['products_id']));
  }
// END OF BUILDER INTERVENTION

 

Link to comment
Share on other sites

  • 3 months later...
On 11/15/2018 at 10:53 AM, LeeFoster said:

From what I can tell we just need to make the last manual change  hard coded.

$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
  $product_check = tep_db_fetch_array($product_check_query);

## REPLACE WITH:

// BUILDER INTERVENTION - redirect to builder_product_info if this is a builder product
  $product_check_query = tep_db_query("select p.builder_product_flag, count(*) as total from products p, products_description pd where (p.products_status = '1' or p.builder_product_flag = '1') and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' group by p.products_id");
  $product_check = tep_db_fetch_array($product_check_query);
if ($product_check['builder_product_flag'] == '1') {
    tep_redirect(tep_href_link('builder_product_info.php?products_id=' . $_GET['products_id']));
  }
// END OF BUILDER INTERVENTION

@burt you know more about oscommerce than most. Any idea on a work around?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...