QTpro

Attributes Stock tab (1.0.8.16) - QTpro

Re: Attributes Stock tab (1.0.8.16)

by raiwa » Sun Nov 06, 2022 4:50 pm

Hi Omar,

Thank you for the research and point into the right direction.
Yes, I could reproduce the problem and found the fix:
In: templates\override\includes\hooks\shop\siteWide\qtPro.php
add in line 66 the array reset:

Code: Select all

        $attribute_array = [];
Then line 65-69 should look like this:

Code: Select all

      foreach ($GLOBALS['order']->products as $product) {
        $attribute_array = [];
        $product_id = Product::build_prid($product['id']);
        if (($stock_values = $GLOBALS['db']->query(sprintf($stock_sql, (int)$product_id))->fetch_assoc()) && empty($stock_values['is_virtual'])) {
          $stock_left = $stock_values['products_quantity'] - $product['qty'];
Please report back and I'll upload the update with this fix.

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
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Contact:

Re: Attributes Stock tab (1.0.8.16)

by Omar_one » Sun Nov 06, 2022 6:10 pm

Hello Rainer,
that's fix the issue .
Thank you so much
Omar
Omar_one
Senior Contributor
Posts: 677
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Contact: