renamed variables to
This commit is contained in:
@@ -53,7 +53,7 @@ class Wiaas_Template_Admin_Ajax {
|
|||||||
check_ajax_referer('wc_bundles_add_bundled_product', 'security');
|
check_ajax_referer('wc_bundles_add_bundled_product', 'security');
|
||||||
|
|
||||||
$loop = intval($_POST['id']);
|
$loop = intval($_POST['id']);
|
||||||
$product_id = intval($_POST['product_id']);
|
$emplate_category_id = intval($_POST['template_category_id']);
|
||||||
$title = $_POST['title'];
|
$title = $_POST['title'];
|
||||||
$options = $_POST['options'];
|
$options = $_POST['options'];
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ class Wiaas_template {
|
|||||||
|
|
||||||
foreach ($template_items as $item) {
|
foreach ($template_items as $item) {
|
||||||
|
|
||||||
$product_id = $item['template_category_id'];
|
$template_category_id = $item['template_category_id'];
|
||||||
$title = $item['template_category_title'];
|
$title = $item['template_category_title'];
|
||||||
$quantity = $item['quantity'];
|
$quantity = $item['quantity'];
|
||||||
|
|
||||||
@@ -157,20 +157,20 @@ class Wiaas_template {
|
|||||||
|
|
||||||
foreach ($posted_template_data as $data) {
|
foreach ($posted_template_data as $data) {
|
||||||
|
|
||||||
$product_id = isset($data['product_id']) ? absint($data['product_id']) : false;
|
$template_category_id = isset($data['template_category_id']) ? absint($data['template_category_id']) : false;
|
||||||
$product_title = isset($data['product_title']) ? $data['product_title'] : false;
|
$template_category_title = isset($data['template_category_title']) ? $data['template_category_title'] : false;
|
||||||
$quantity = isset($data['quantity']) ? absint($data['quantity']) : false;
|
$quantity = isset($data['quantity']) ? absint($data['quantity']) : false;
|
||||||
|
|
||||||
|
|
||||||
$item_data = array(
|
$item_data = array(
|
||||||
|
|
||||||
'template_category_id' => $product_id,
|
'template_category_id' => $template_category_id,
|
||||||
'template_category_title' => trim($product_title),
|
'template_category_title' => trim($template_category_title),
|
||||||
'quantity' => $quantity
|
'quantity' => $quantity
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$processed_template_data[$product_id] = $item_data;
|
$processed_template_data[$template_category_id] = $item_data;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ if (!defined('ABSPATH')) {
|
|||||||
?><input type="hidden" name="template_data_<?php echo $options?>[<?php echo $loop; ?>][item_id]" class="item_id" value="<?php echo $item_id; ?>" /><?php
|
?><input type="hidden" name="template_data_<?php echo $options?>[<?php echo $loop; ?>][item_id]" class="item_id" value="<?php echo $item_id; ?>" /><?php
|
||||||
}
|
}
|
||||||
|
|
||||||
?><input type="hidden" name="template_data_<?php echo $options?>[<?php echo $loop; ?>][product_title]" class="product_title" value="<?php echo $title; ?>" /><?php
|
?><input type="hidden" name="template_data_<?php echo $options?>[<?php echo $loop; ?>][template_category_title]" class="product_title" value="<?php echo $title; ?>" /><?php
|
||||||
?><input type="hidden" name="template_data_<?php echo $options?>[<?php echo $loop; ?>][product_id]" class="product_id" value="<?php echo $product_id; ?>" />
|
?><input type="hidden" name="template_data_<?php echo $options?>[<?php echo $loop; ?>][template_category_id]" class="product_id" value="<?php echo $template_category_id; ?>" />
|
||||||
|
|
||||||
</div><?php
|
</div><?php
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user