GX-Bug #52070
geschlossen"Division by zero" in der "buy now" Funktion, wenn mögliche Mengenstaffelung gleich 0 ist
100%
Mögliche Mengenstaffelung wird beim "buy now" auf 1 gesetzt, wenn dieser kleiner gleich 0 ist.
Beschreibung
Generell gilt, dass die mögliche Mengenstaffelung einen Wert grlößer gleich 1 haben muss. Durch den CSV Import kann es, dass solche fehlerhafte Daten vorkommen können. In dem Fall kommt es bei der "buy now" Funktion zu einem "Division by zero" Fehler.
WARNING(2): "Division by zero" in /var/www/system/classes/shopping_cart/CartActionsProcess.inc.php:735
#4 File: /var/www/system/classes/shopping_cart/CartActionsProcess.inc.php:735
Code:
│ line 733: if($gm_qty_check == false)
│ line 734: {
├─ line 735: $gm_result = $gm_qty / $row['gm_graduated_qty'];
│ line 736: $gm_result = round($gm_result, 4); // workaround for next if-case to avoid calculating failure
│ line 737: if((int)$gm_result != $gm_result)
#3 File: /var/www/system/classes/shopping_cart/CartActionsProcess.inc.php:176
Code:
│ line 174: return;
│ line 175: }
├─ line 176: $this->buy_now($goto, $parameters);
│ line 177: // EOF GM_MOD
│ line 178: break;
#2 File: /var/www/includes/cart_actions.php:89
Code:
│ line 87: $coo_download_process->set_('customers_fsk18_display', $SESSION['customers_status']['customers_fsk18_display']);
│ line 88:
├─ line 89: $coo_download_process->proceed($_GET['action']);
│ line 90:
│ line 91: $t_info_message = $coo_download_process->get('info_message');
#1 File: /var/www/includes/application_top.php:712
Code:
│ line 710: $messageStack = new messageStack;
│ line 711:
├─ line 712: require (DIR_WS_INCLUDES.FILENAME_CART_ACTIONS);
│ line 713:
│ line 714: // include the who's online functions
#0 File: /var/www/index.php:27
Code:
│ line 25: --------------------------------------------------------------------------------------- */
│ line 26:
├─ line 27: include ('includes/application_top.php');
│ line 28:
│ line 29: $coo_listing_control = MainFactory::create_object('ProductListingContentControl');
Request: GET /index.php?action=buy_now&BUYproducts_id=103&cat=c45_STAUD.html&page=8
- duration: ~12ms
- server: nginx/1.12.0
- server address: 172.17.0.29
- user agent: Mozilla/5.0 (compatible; MJ12bot/v1.4.7; http://mj12bot.com/)
- remote address: 59e31a356e5ad9d980e5c8fb05c599f7
Session:
- tpl: Honeygrid
- MOBILE_ACTIVE: false
- language: german
- languages_id: 2
- language_charset: utf-8
- language_code: de
- currency: EUR
- customers_status: Array
(
[customers_status_id] => 1
[customers_status_name] => Gast
[customers_status_image] => guest_status.gif
[customers_status_discount] => 0.00
[customers_status_public] => 0
[customers_status_min_order] => 0
[customers_status_max_order] => 0
[customers_status_ot_discount_flag] => 0
[customers_status_ot_discount] => 0.00
[customers_status_graduated_prices] => 1
[customers_status_show_price] => 1
[customers_status_show_price_tax] => 1
[customers_status_add_tax_ot] => 1
[customers_status_payment_unallowed] =>
[customers_status_shipping_unallowed] =>
[customers_status_discount_attributes] => 0
[customers_fsk18] => 1
[customers_fsk18_display] => 1
[customers_status_write_reviews] => 0
[customers_status_read_reviews] => 1
)
- cart: shoppingCart Object
(
[contents] => Array
(
)
[total] => 0
[weight] => 0
[content_type] =>
)
- wishList: wishList Object
(
[contents] => Array
(
)
[total] => 0
[weight] => 0
[content_type] =>
)
- customer_id: ### Session entry not present ###
- payment: ### Session entry not present ###
- shipping: ### Session entry not present ###
- cartID: ### Session entry not present ###
- sendto: ### Session entry not present ###
- billto: ### Session entry not present ###
Get:
- action: buy_now
- BUYproducts_id: 103
- cat: c45_STAUD.html
- page: 8
Zugehörige Tickets