瀏覽代碼

xuan xiang jie mian

NoteStar 5 年之前
父節點
當前提交
e65e628ad1
共有 1 個文件被更改,包括 25 次插入1 次删除
  1. 25 1
      appfront/theme/terry/theme01/catalog/product/index.php

+ 25 - 1
appfront/theme/terry/theme01/catalog/product/index.php

@@ -81,7 +81,7 @@
                             <?php
                             <?php
                             $groupAttrArr = [
                             $groupAttrArr = [
                                     'Bust'=>'80',
                                     'Bust'=>'80',
-                                    'Waist'=>'70',
+                                    'Waist'=>'60',
                                     'Hips'=>'70',
                                     'Hips'=>'70',
                                     'Hollow to floor'=>'60',
                                     'Hollow to floor'=>'60',
                             ];
                             ];
@@ -302,6 +302,29 @@
 					custom_option[attr] = value;
 					custom_option[attr] = value;
 				});
 				});
 				custom_option_json = JSON.stringify(custom_option);
 				custom_option_json = JSON.stringify(custom_option);
+
+                var a = $(".current.my_sizebj").text();
+                if(a == 'CustomSize'){
+                    customsize = new Object();
+                    $("input.custom_op").each(function(){
+                        attr = $(this).attr("attr");
+                        value = $(this).val();
+                        customsize[attr] = value;
+
+                        if(value == ''){
+                            alert("Please fill in "+ attr);
+                            throw SyntaxError();
+                        }
+
+                    });
+                    customsize = JSON.stringify(customsize);
+                }else{
+
+                    customsize = '';
+                }
+
+
+
 				//alert(custom_option_json);
 				//alert(custom_option_json);
 				sku = $(".sku").val();
 				sku = $(".sku").val();
 				qty = $(".qty").val();
 				qty = $(".qty").val();
@@ -318,6 +341,7 @@
 				$data['custom_option'] 	= custom_option_json;
 				$data['custom_option'] 	= custom_option_json;
 				$data['product_id'] 	= "<?= $_id ?>";
 				$data['product_id'] 	= "<?= $_id ?>";
 				$data['qty'] 			= qty;
 				$data['qty'] 			= qty;
+                $data['customsize']     = customsize;
 				if (csrfName && csrfVal) {
 				if (csrfName && csrfVal) {
 					$data[csrfName] 		= csrfVal;
 					$data[csrfName] 		= csrfVal;
 				}
 				}