diff --git a/backend/app/plugins/wiaas/includes/admin/template/class-wiaas-template-admin-ajax.php b/backend/app/plugins/wiaas/includes/admin/template/class-wiaas-template-admin-ajax.php index 842121f..7005b06 100644 --- a/backend/app/plugins/wiaas/includes/admin/template/class-wiaas-template-admin-ajax.php +++ b/backend/app/plugins/wiaas/includes/admin/template/class-wiaas-template-admin-ajax.php @@ -53,7 +53,7 @@ class Wiaas_Template_Admin_Ajax { check_ajax_referer('wc_bundles_add_bundled_product', 'security'); $loop = intval($_POST['id']); - $product_id = intval($_POST['product_id']); + $emplate_category_id = intval($_POST['template_category_id']); $title = $_POST['title']; $options = $_POST['options']; diff --git a/backend/app/plugins/wiaas/includes/admin/template/class-wiaas-template-products.php b/backend/app/plugins/wiaas/includes/admin/template/class-wiaas-template-products.php index 90aff5d..899c16d 100644 --- a/backend/app/plugins/wiaas/includes/admin/template/class-wiaas-template-products.php +++ b/backend/app/plugins/wiaas/includes/admin/template/class-wiaas-template-products.php @@ -107,7 +107,7 @@ class Wiaas_template { foreach ($template_items as $item) { - $product_id = $item['template_category_id']; + $template_category_id = $item['template_category_id']; $title = $item['template_category_title']; $quantity = $item['quantity']; @@ -157,20 +157,20 @@ class Wiaas_template { foreach ($posted_template_data as $data) { - $product_id = isset($data['product_id']) ? absint($data['product_id']) : false; - $product_title = isset($data['product_title']) ? $data['product_title'] : false; + $template_category_id = isset($data['template_category_id']) ? absint($data['template_category_id']) : false; + $template_category_title = isset($data['template_category_title']) ? $data['template_category_title'] : false; $quantity = isset($data['quantity']) ? absint($data['quantity']) : false; $item_data = array( - 'template_category_id' => $product_id, - 'template_category_title' => trim($product_title), + 'template_category_id' => $template_category_id, + 'template_category_title' => trim($template_category_title), 'quantity' => $quantity ); - $processed_template_data[$product_id] = $item_data; + $processed_template_data[$template_category_id] = $item_data; } diff --git a/backend/app/plugins/wiaas/includes/admin/template/views/html-wiaas-template-product.php b/backend/app/plugins/wiaas/includes/admin/template/views/html-wiaas-template-product.php index 0c0e03d..ea8bd95 100644 --- a/backend/app/plugins/wiaas/includes/admin/template/views/html-wiaas-template-product.php +++ b/backend/app/plugins/wiaas/includes/admin/template/views/html-wiaas-template-product.php @@ -18,8 +18,8 @@ if (!defined('ABSPATH')) { ?> + ?>