2020-10-08 9:24:07 - PHP Notice: Undefined variable: product_info in /home/dbkdu3lq/autoclips.bg/catalog/controller/product/fastorder.php on line 67
2020-10-08 9:24:10 - PHP Notice: Undefined variable: product_info in /home/dbkdu3lq/autoclips.bg/catalog/controller/product/fastorder.php on line 186
2020-10-08 9:24:10 - PHP Notice: Undefined variable: product_info in /home/dbkdu3lq/autoclips.bg/catalog/controller/product/fastorder.php on line 187
the fastorder.php is:
Code: Select all
public function index($data) {
// Debugging
if($this->dev){
// Write message if developer version is enable.
echo '<div style="margin:0px; width:100%; text-align: right; padding:0 10px; font-weight:bold; color:#c53d36">This is developer version (FastOrder)!</div>';
}
// If page not found - do not show button
if(empty($data['name'])){
return false;
}
// If Display stock is enable and out of stock is disbale - do not show fastorder button
if ( $this->config->get('config_stock_display')
and !$this->config->get('config_stock_checkout')
and $this->model_catalog_product->getProduct($data['product_id'])['quantity'] < 1
) {
return false;
}
// Load lanuage
$this->load->language('product/fastorder');
// Language data - i have clear the rest and leav only the minimum
//minimum
$data['text_minimum'] = sprintf($this->language->get('text_minimum'), $product_info['minimum']);
// If special price is set - display it
if(isset($data['special'])){
$data['price'] = $data['special'];
}else{
$special = false;
}
if(!isset($data['price'])){
$data['price'] = $data['txt_none_price'];
}
if($this->config->get('config_template')) {
$template = $this->config->get('config_template');
}else{
$template = 'default';
}
// Need before rewrite module (hack)
$data['product_name'] = $data['name'];
// Get the product link
//if (isset($this->request->server['REQUEST_SCHEME'])) {
// $data['product_link'] = $this->request->server['REQUEST_SCHEME'].'://' . $this->request->server['HTTP_HOST'] . $this->request->server['REQUEST_URI'];
// }else{
// $data['product_link'] = 'http://' . $this->request->server['HTTP_HOST'] . $this->request->server['REQUEST_URI'];
// }
// Get the product link
if (isset($this->request->get['path'])) {
$path = 'path=' . $this->request->get['path'];
}else{
$path = 'route=' . $this->request->get['route'];
}
$data['product_link'] = $this->url->link('product/product', $path . '&product_id=' . $data['product_id']);
// FastOrder price var
$data['price'] = $this->currency->format($this->tax->calculate($data['price'], $data['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency'],'',false);
// FastOrder special price var
if($data['special']){
$fo_special = $this->currency->format($this->tax->calculate($data['special'], $data['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency'],'',false);
}else{
$fo_special = null;
}
$this->document->addStyle('catalog/view/theme/'. $template.'/stylesheet/fastorder.css');
if(VERSION >= '2.2.0.0') {
return $this->load->view('product/fastorder', $data);
}else{
return $this->load->view($this->config->get('config_template') . '/template/product/fastorder.tpl', $data);
}
}