Jump to content
LeeFoster

Custom Product Builder of OSc BS

Recommended Posts

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

 

Share this post


Link to post
Share on other sites

Ah I see.
I was using PHP 7.0.21 when I was working and it didn't throw any errors.
I quickly swapped to 7.2.1 and I can see the same errors now. I'll have a closer look asap.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Firefox 61.0.1
PHP 7.2.1
Clean Frozen shop no other apps or mods installed running on XAMPP local server.

 

Share this post


Link to post
Share on other sites
Just now, Tsimi said:

Firefox 61.0.1
PHP 7.2.1
Clean Frozen shop no other apps or mods installed running on XAMPP local server.

 

I'm on chrome with php 7.2.5

Also clean Frozen on local XAMPP. Will test on Firefox later

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
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 🙄

Share this post


Link to post
Share on other sites
3 minutes ago, raiwa said:

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

I know that feeling. How far did we get with it?

 

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites
On 11/16/2018 at 6:10 AM, Tsimi said:

@LeeFoster

Sorry for chiming in late.
Wasn't there an issue about product stock not being subtracted?

I've just installed this and it is now deducting stock. Must have been something I did wrong. 

Just the core code change to fix now.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
2 hours ago, LeeFoster said:

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

A workaround for what?  I've never looked at this addon...


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×