Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Stock Management Issue when Set By Product Options
Author « Topic »  

xyz1
Advanced Member

United Kingdom
177 Posts

Posted - 08/04/2025 :  08:39:01  
Currently running PHP version 7.8.7 which was installed approx 12th July 2025.

Over the weekend we've noticed that an issue has occurred with the Stock Levels/Stock Management for product codes where the stock level is "Set By Product Options".

For any product code where the stock quantity was Nil/Zero and "Set By Product Options" the stock quantity now shows a random but extremely large stock quantity number e.g. 1626224185 and amongst other things this potentially means that out of stock products or obsolete product lines now appear as available to order from the website.

I noticed that with updater 7.8.5 there was mention of "There is a very important fix for stock management calculations for products which have stock set by options" and wonder if this is related to that fix in some way?

We can go in to each of the affect product codes and remove the stock level "Set By Product Options" setting and then change the stock level to zero (which will involve a bit of work to get things back to normal) but thought I would flag the issue up in case this is some sort of bot exploit going on or if we need to be delving deeper into the root cause?

Thanks in advance for any suggestions.

Neil

xyz1
Advanced Member

United Kingdom
177 Posts

Posted - 08/04/2025 :  08:50:51  
Also noticed that when changing any stock levels from the Product Admin>Administration page now getting the following warning flashed up on screen:

Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1

Update Successful !

You will now be forwarded to the admin home page.

If that does not happen automatically then please click here.

Vince
Administrator

43155 Posts

Posted - 08/05/2025 :  04:39:57  
Hi Neil
I've tried it here and it seems fine with stock levels by product options so can you try getting the latest v7.8 updater and apply that fully just to make sure that all the scripts are good. Then if you still get the problem can you send the site FTP login to my email (vince AT ecommercetemplates DOT com) and I'll see what is up.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

xyz1
Advanced Member

United Kingdom
177 Posts

Posted - 08/05/2025 :  11:08:06  
Hi Vince,

Many thanks for your reply

Have reapplied the latest update to the site as suggested.

Before reapplying the updater did a quick comparison using BeyondCompare for any changes/differences between the updater files applied to the site on 12 July and the various files in the latest updater downloaded today 5 August and the only files with minor code changes were:
\js\ectcart.js
\vsadmin\inc\uspsshipping.php

The code changes in the \js\ectcart.js have resolved an issue with the product options not showing on customer orders when they used the quickbuy button as highlighted in this separate topic https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=116327

But still getting the warning below when altering stock quantities.

There are still some product codes with the extremely large stock quantity numbers which appeared out of nowhere as mentioned in the original post e.g. 1626224185. Will these large values be the cause of the warning message (in which case I'll get the errant values all changed) or do you want the FTP login details at this stage for a looksee before I do anything else?

Neil

Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1Out of range value for column 'pInStock' at row 1

Vince
Administrator

43155 Posts

Posted - 08/06/2025 :  08:22:44  
Hi Neil
quote:
Will these large values be the cause of the warning message (in which case I'll get the errant values all changed) or do you want the FTP login details at this stage for a looksee before I do anything else?
It's worth trying changing the values for one product to see if this is the problem and then if it doesn't cure the problem, send me the FTP login.

Vince


Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

xyz1
Advanced Member

United Kingdom
177 Posts

Posted - 08/06/2025 :  10:39:47  
Hi Vince,

Many thanks.

Still throwing the same error message when changing the quantity for any of the products.

FTP details sent.

Neil

Vince
Administrator

43155 Posts

Posted - 08/07/2025 :  05:00:41  
Hi Neil
I had a look and I think I see what the problem is. Taking one of your products as an example, BFS15DP this has an option with ALT ID's and again as an example one of those options is bfs-15 which is a hidden product as it is only referenced by the ALT ID. But this product also has stock set by the options and has the same option as the parent product. So as in the new version the stock of the parent product is calculated as the sum of the stock of all the options this is happening twice and you end up with some wacky stock levels that is blowing the maximum for an INT data type.
I've added a fix to your site which I'm going to include in the updater where the stock for items which are set to not display are not calculated. But also I think for your hidden products like bfs-15 you should remove the option.
I'm sorry if this messed up your stock levels but you should be able to set them back properly now.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

xyz1
Advanced Member

United Kingdom
177 Posts

Posted - 08/12/2025 :  10:05:32  
Hi Vince,

Many thanks for taking a look at this and adding the fix to the site.

The issue with the stock levels doesn't look to have reoccured since you added the fix.

And as suggested I'll look to remove the option from the hidden products with the ALT IDs

Thanks again for sorting it out.

Neil
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000