QTpro

Addon is Allowing to add qty more than stock defined - QTpro

Addon is Allowing to add qty more than stock defined

by radhavallabh » Wed Jun 29, 2022 5:05 am

Hi dear;
Using 1.0.8.15;
I added track options on a attribute drop down.
Example-
I define 3 attributes-
A - stock 3
B- stock 2
C- stock 4

But the customer is still able to add more than the qty. defined for the selected attribute on the product page.
Example-
I am still able to add 10 pcs of C although stock is of 4.
It does not show any alert or message stating the customer to not add more than the available qty.

Please can you help me with the above issue;
Thanking you in advance;
Very Warm Regds/
radhavallabh
radhavallabh
VIP Member
VIP Member
Posts: 367
Joined: Tue Oct 27, 2020 4:09 am
Contact:

Re: Addon is Allowing to add qty more than stock defined

by raiwa » Wed Jun 29, 2022 10:31 am

Do you have track stock enabled for these attributes? Please post screenshots and which exact drop down module you are using.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1209
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Addon is Allowing to add qty more than stock defined

by radhavallabh » Wed Jun 29, 2022 11:29 am

raiwa wrote:Do you have track stock enabled for these attributes? Please post screenshots and which exact drop down module you are using.
Yes dear track stock enabled;
It is using the pad_multiple_dropdowns to fetch the attributes.
Attaching screenshot of a dropdown with tracked options dear.
Screenshot 2022-06-29 165834.png
Attaching admin screenshot as well dear-
Screenshot 2022-06-29 at 17-00-21 CE Phoenix Cart Administration Tool.png
radhavallabh
VIP Member
VIP Member
Posts: 367
Joined: Tue Oct 27, 2020 4:09 am
Contact:

Re: Addon is Allowing to add qty more than stock defined

by raiwa » Wed Jun 29, 2022 4:13 pm

It works like expected. QtPro does not look on what has been already added to the cart. It only prevents adding an option (combination) if there is no stock.
See screenshot:
qtpro_screen_out_of_stock.png
qtpro_screen_out_of_stock.png (14.15 KiB) Viewed 71 times
Your case must be managed by the Configuration: Stock: "Allow Checkout"-> false option when trying to checkout.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1209
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Addon is Allowing to add qty more than stock defined

by radhavallabh » Fri Jul 01, 2022 1:08 pm

raiwa wrote:It works like expected. QtPro does not look on what has been already added to the cart. It only prevents adding an option (combination) if there is no stock.
See screenshot:
qtpro_screen_out_of_stock.png
Your case must be managed by the Configuration: Stock: "Allow Checkout"-> false option when trying to checkout.
Hi dear ;
Sorry for delay in reply;
I tried again the above too,
On the product page-
The message appears only when stock is 0 from the beginning on the attribute.
If tracked-stock of the attribute is 2 and the quantity to add is 4 it does not show the above out of stock message dear.

That is the main issue I am facing....
Please can you help me fix it dear;
Thank you in advance;
Regds./
radhavallabh
radhavallabh
VIP Member
VIP Member
Posts: 367
Joined: Tue Oct 27, 2020 4:09 am
Contact:

Re: Addon is Allowing to add qty more than stock defined

by raiwa » Fri Jul 01, 2022 1:17 pm

radhavallabh wrote:
raiwa wrote:It works like expected. QtPro does not look on what has been already added to the cart. It only prevents adding an option (combination) if there is no stock.
See screenshot:
qtpro_screen_out_of_stock.png
Your case must be managed by the Configuration: Stock: "Allow Checkout"-> false option when trying to checkout.
Hi dear ;
Sorry for delay in reply;
I tried again the above too,
On the product page-
The message appears only when stock is 0 from the beginning on the attribute.
If tracked-stock of the attribute is 2 and the quantity to add is 4 it does not show the above out of stock message dear.

That is the main issue I am facing....
Please can you help me fix it dear;
Thank you in advance;
Regds./
radhavallabh

It's how it works. What you request is not implemented.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1209
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Addon is Allowing to add qty more than stock defined

by radhavallabh » Sat Jul 02, 2022 6:25 am

raiwa wrote:
radhavallabh wrote:
raiwa wrote:It works like expected. QtPro does not look on what has been already added to the cart. It only prevents adding an option (combination) if there is no stock.
See screenshot:

Your case must be managed by the Configuration: Stock: "Allow Checkout"-> false option when trying to checkout.
Hi dear ;
Sorry for delay in reply;
I tried again the above too,
On the product page-
The message appears only when stock is 0 from the beginning on the attribute.
If tracked-stock of the attribute is 2 and the quantity to add is 4 it does not show the above out of stock message dear.

That is the main issue I am facing....
Please can you help me fix it dear;
Thank you in advance;
Regds./
radhavallabh

It's how it works. What you request is not implemented.
Hi dear;
One more issue I get below error if I add out of stock tracked stock products to the cart.
Screenshot 2022-07-02 115401.png
Please can you help with the issue;
Very Warm Regds./
radhavallabh
radhavallabh
VIP Member
VIP Member
Posts: 367
Joined: Tue Oct 27, 2020 4:09 am
Contact:

Re: Addon is Allowing to add qty more than stock defined

by raiwa » Sat Jul 02, 2022 3:36 pm

In templates\override\includes\hooks\shop\siteWide\qtPro.php,
change line 157 to:

Code: Select all

      $stock = $attributes_stock_array[$attr_list]?? 0;
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1209
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Addon is Allowing to add qty more than stock defined

by radhavallabh » Sun Jul 03, 2022 11:12 am

raiwa wrote:In templates\override\includes\hooks\shop\siteWide\qtPro.php,
change line 157 to:

Code: Select all

      $stock = $attributes_stock_array[$attr_list]?? 0;
Thank you dear!!
Very Warm Regds./
radhavallabh
radhavallabh
VIP Member
VIP Member
Posts: 367
Joined: Tue Oct 27, 2020 4:09 am
Contact:

Re: Addon is Allowing to add qty more than stock defined

by raiwa » Fri Jul 08, 2022 7:26 am

raiwa wrote:
radhavallabh wrote:
raiwa wrote:It works like expected. QtPro does not look on what has been already added to the cart. It only prevents adding an option (combination) if there is no stock.
See screenshot:
qtpro_screen_out_of_stock.png
Your case must be managed by the Configuration: Stock: "Allow Checkout"-> false option when trying to checkout.
Hi dear ;
Sorry for delay in reply;
I tried again the above too,
On the product page-
The message appears only when stock is 0 from the beginning on the attribute.
If tracked-stock of the attribute is 2 and the quantity to add is 4 it does not show the above out of stock message dear.

That is the main issue I am facing....
Please can you help me fix it dear;
Thank you in advance;
Regds./
radhavallabh

It's how it works. What you request is not implemented.
I thought about and will try to add it in the next update.

Best wishes
Rainer
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1209
Joined: Sat Dec 21, 2019 8:08 am
Contact: