Esempio n. 1
0
                        $tbl .= fn_price_list_print_product_data($product, $selected_fields, $style, $price_schema);
                        $fill = !$fill;
                    }
                    $counter->out();
                }
                $tbl .= '</table>';
                $counter->out();
                Pdf::batchAdd($tbl);
            }
        }
    }
    //Close and output PDF document
    $temp_filename = fn_create_temp_file();
    $imp_filename = $temp_filename . '.pdf';
    fn_rename($temp_filename, $imp_filename);
    Pdf::batchRender($imp_filename, true);
    Storage::instance('assets')->put($filename, array('file' => $imp_filename, 'caching' => true));
    fn_echo('<br />' . __('done'));
}
/**
 *
 * Adds product data in HTML format to price list table
 * @param array $product Product data
 * @param array $selected_fields Product fields that should be in price list
 * @param string $style Product row style (similar to the HTML style attribute, e.g.: style="background-color: #EEEEEE")
 * @param array $price_schema Price list columns scheme
 * @param array $options_variants Product options variants
 *
 * @return string Product data row in HTML format
 */
function fn_price_list_print_product_data($product, $selected_fields, $style, $price_schema, $options_variants = array())
Esempio n. 2
0
 protected function printFooter()
 {
     RenderPdf::batchAdd('</table></body></html>');
     RenderPdf::batchRender($this->getFileName(), true);
 }