Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Disable your ad blocker to continue using our website.
QTpro
Undefined offset: XX - QTpro
by Omar_one » Tue Jul 05, 2022 7:05 pm
Hello Raiwa,
When I am visiting the admin-> Reports->Stock Report (v1.0.8.14 / QTpro v7.4.5 )
I got a lot of errors , same error but different number for same line in error_log file
Code: Select all
PHP Notice: Undefined offset: 10 in /home/xxxx/public_html/xxxxxx/admin/stats_low_stock_attrib.php
on line 205
Br
Omar
-
Omar_one
- VIP Member
- Posts: 481
- Joined: Fri Oct 25, 2019 5:06 pm
-
Contact:
by raiwa » Tue Jul 05, 2022 8:11 pm
I do not get this, but you can try in line 205:
Code: Select all
$total_price += $attributes_price[$attr[0]][$attr[1]]?? 0;
-
raiwa
- PhoenixCart Developer
- Posts: 1184
- Joined: Sat Dec 21, 2019 8:08 am
- : Buy Me A Beverage
-
Contact:
by Omar_one » Tue Jul 05, 2022 9:06 pm
raiwa wrote:I do not get this, but you can try in line 205:
Code: Select all
$total_price += $attributes_price[$attr[0]][$attr[1]]?? 0;
fixed, the errors gone
Thank you
-
Omar_one
- VIP Member
- Posts: 481
- Joined: Fri Oct 25, 2019 5:06 pm
-
Contact:
by Omar_one » Tue Aug 16, 2022 12:16 pm
Hello Raiwa,
same issue but on different file
Code: Select all
PHP Notice: Undefined offset: 1 in /home/xxxx/public_html/shop/includes/system/override/qtpro/pad_sequenced_dropdowns.php on line 89
line 85-97
Code: Select all
for($o = 0; $o < sizeof($attributes); $o++) {
$s = sizeof($attributes[$o]['ovals']);
for ($a = 1; $a < $s; $a++) {
$stock_sum = 0;
$attributes_combination = $attributes[$o]['oid'] . '-' . $attributes[$o]['ovals'][$a]['id'];
// loop through products_attrib_stock array and check for stock
foreach ($this->products_attrib_stock as $attrib_combs => $stock) {
if ( strpos($attrib_combs, $attributes_combination) !== false) {
$stock_sum += $stock;
}
}
$out_of_stock = ($stock_sum > 0)? false : true;
}
I applied same fix from the previous post to line 89 but its not help
Code: Select all
$attributes_combination = $attributes[$o]['oid'] . '-' . $attributes[$o]['ovals'][$a]['id'] ?? 0;
thank you for your help
Omar
-
Omar_one
- VIP Member
- Posts: 481
- Joined: Fri Oct 25, 2019 5:06 pm
-
Contact:
by raiwa » Tue Aug 16, 2022 2:08 pm
Thanks, I'll address this in the next update.
-
raiwa
- PhoenixCart Developer
- Posts: 1184
- Joined: Sat Dec 21, 2019 8:08 am
- : Buy Me A Beverage
-
Contact:
by Omar_one » Thu Sep 29, 2022 6:42 pm
raiwa wrote:Thanks, I'll address this in the next update.
Thank you for that update but I still have the error
Code: Select all
PHP Notice: Undefined offset: 5 in /home/xxxx/public_html/includes/system/override/qtpro/pad_sequenced_dropdowns.php on line 89
PHP Notice: Trying to access array offset on value of type null in /home/xxxx/public_html/includes/system/override/qtpro/pad_sequenced_dropdowns.php on line 89
-
Omar_one
- VIP Member
- Posts: 481
- Joined: Fri Oct 25, 2019 5:06 pm
-
Contact:
by raiwa » Fri Sep 30, 2022 7:57 am
I can't reproduce this error.
Remember that you have to set all options to be stocked for a product, to use the sequenced drop down.
You need to have stock entered for the attributes combinations of the products and no error message like: "Warning: There are 1 sick products in the database. Please visit the QTPro doctor" should show up in the admin area.
-
raiwa
- PhoenixCart Developer
- Posts: 1184
- Joined: Sat Dec 21, 2019 8:08 am
- : Buy Me A Beverage
-
Contact: