Jump to content

Recommended Posts

Hi,
Be warned, this content is tedious and triviality in the extreme, reading it may numb your brain, you may even lose the will to live. You have been warned (hopefully it is right):
 
1) includes/actions/update_product.php –
    if there are items in cart, some with attributes, some without attributes, updating qty will throw an error “Undefined offset: x” for each item without attributes (x = product_id).
    It executes correctly but any error is a tad unwelcome.
 
2) administrators table -
    user_name is defined with ‘collation = utf8_bin’ all other character type items seem to be defined with collation ‘utf8_unicode_ci’.
    Is there a reason? Does it matter? Does anyone care?
 
3) customers table -
    customers_dob is defined default = ‘1970-01-01 00:00:01’, I think it was defined as ‘NULL’ in previous versions (?).
    Is there a reason? Does it matter? Does anyone care? Should previous ‘null’ entries be changed to ‘1970-01-01 00:00:01’?
 
4) orders_status table -
    public_flag and downloads_flag are defined as int(11).
    Could they be defined as tinyint(1)? Does it matter? Does anyone care?  (told you these were trivialities).
 
5) product_info.php
    Can line 38
            $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_gtin from products p, 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 . "'");
 
    be moved to overwrite line 21
            $product_check_query = tep_db_query("select count(*) as total from products p, 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 . "'");
 
    and line 26
        if ($product_check['total'] < 1)
    be changed to
        if (tep_db_num_rows($product_info_query)<1)
 
    $product_check['total'] is used elsewhere (maybe set $product_check['total'] = tep_db_num_rows($product_info_query)?).
 
    Very trivial, but it does save a database access (does it really matter any more?). Several other modules read product info details, could all details be prepared in a product_info header tag module so it is readily available to other modules? 
 
6) includes/modules/navbar-modules/nb_home.php & nb_account.php
    These can both be placed in ‘Home’ portion of navbar, I don’t think ‘Home’ is designed for these ‘<li>’ type items?
 
7) Is it possible/worthwhile including a facility in application_top.php to output all errors to a file. Better still, the option output to screen and/or file and possibly the facility to set the error level? If an error occurs in a template module I don’t think is displays anywhere (?) so could go unnoticed for quite a while.
 
8) define('MODULE_NAVBAR_SHOPPING_CART_NO_CONTENTS', '<i class="fas fa-shopping-cart fa-fw"></i> 0 items');
    is this used?
 
9) define(‘MODULE_NAVBAR_SHOPPING_CART_VIEW_CART’, 'View Cart');
    is this used?

Share this post


Link to post
Share on other sites

Nice view :)

Could be integrated into next release or current? @burt



Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

 

Share this post


Link to post
Share on other sites

A lot of triviality, but if things are bust they need to be fixed.  Anyone can raise an issue at Github, chat about it to find the best resolution... then if necessary they can fix & push, that's the beauty of an open codebase allied to people who care about Phoenix being the best it can be.

Edited by burt

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

×