Connected template category to product in bundle product search

This commit is contained in:
Nedim Uka
2018-10-23 15:48:56 +02:00
parent 18f40d9403
commit 66452eee86
5 changed files with 42 additions and 11 deletions

View File

@@ -9,11 +9,17 @@ class Wiaas_Template_Category_Object {
public $quantity = '';
public $product_id = '';
public function __construct($id, $title, $quant) {
public $product_name = '';
public function __construct($id, $title, $quant, $product_id = '', $product_name = '') {
$this->template_category_id = $id;
$this->name = $title;
$this->quantity = $quant;
$this->product_id = $product_id;
$this->product_name = $product_name;
}
public function get_quantity(){

View File

@@ -92,7 +92,9 @@ function construct_template_products_class() {
$template_category_object = new Wiaas_Template_Category_Object(
$category_template_id,
$cat,
$item_data['quantity_max']);
$item_data['quantity_max'],
$item->get_id(),
$item->get_title());
$template_category_objects[$category_template_id] = $template_category_object;
}