Esempio n. 1
0
             }
             if (Registry::get('addons.price_list.include_options') == 'Y' && $product['has_options']) {
                 $product = fn_price_list_get_combination($product);
                 foreach ($product['combinations'] as $c_id => $c_value) {
                     $product['price'] = $product['combination_prices'][$c_id];
                     $product['weight'] = $product['combination_weight'][$c_id];
                     $product['amount'] = $product['combination_amount'][$c_id];
                     $product['product_code'] = $product['combination_code'][$c_id];
                     $tbl .= fn_price_list_print_product_data($product, $selected_fields, $style, $price_schema, $c_value);
                     $fill = !$fill;
                     if ($fill) {
                         $style = 'style="background-color: ' . FIELDS_ODD_BG_COLOR . '"';
                     } else {
                         $style = '';
                     }
                     $counter->out();
                 }
             } else {
                 $tbl .= fn_price_list_print_product_data($product, $selected_fields, $style, $price_schema);
                 $fill = !$fill;
             }
             $counter->out();
         }
         $tbl .= '</table>';
         $counter->out();
         Pdf::batchAdd($tbl);
     }
 } else {
     fn_echo(__('generating_pdf') . '<br />');
     // Group the products by categories
     // Prepare PDF data