20/1/2024
This commit is contained in:
1
data/order/home.php
Normal file
1
data/order/home.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
@@ -1 +1,173 @@
|
||||
<?php
|
||||
|
||||
|
||||
$view_part = getRequest("part", "basic");
|
||||
|
||||
$view_part_file = str_replace("-", "_", $view_part);
|
||||
|
||||
$part_file = __DIR__."/form_components/". $view_part_file .".php";
|
||||
if(@file_exists($part_file)) {
|
||||
include $part_file;
|
||||
}else{
|
||||
die("File: /form_components/". $view_part_file .".php does not exist!");
|
||||
}
|
||||
|
||||
|
||||
return [
|
||||
"product_info" => _get_product_info(),
|
||||
"product_menu" => _get_product_menu(),
|
||||
"view_part" => $view_part,
|
||||
];
|
||||
|
||||
// helpers
|
||||
|
||||
function _get_product_info() {
|
||||
return [
|
||||
"id" => 12,
|
||||
"title" => "Máy in mã vạch MH241",
|
||||
];
|
||||
}
|
||||
|
||||
function _get_product_menu() {
|
||||
$current_selected = getRequest('part', 'basic');
|
||||
$product_menu = array(
|
||||
array(
|
||||
'id' => 'basic',
|
||||
"name" => "Cơ bản",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'store',
|
||||
"name" => "Cửa hàng",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'category',
|
||||
"name" => "Danh mục",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'seo',
|
||||
"name" => "SEO",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'description',
|
||||
"name" => "Mô tả",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'spec-group',
|
||||
"name" => "Thông số kỹ thuật",//"Thông số",
|
||||
),
|
||||
|
||||
/*"spec" => array(
|
||||
"name" => "Thông số kỹ thuật nhập text", //"Bộ lọc thuộc tính", //"Thông số",
|
||||
"must_have_id" => true,
|
||||
"change_language" => true,
|
||||
),*/
|
||||
|
||||
/*"image-spec" => array(
|
||||
"name" => "Ảnh thông số",
|
||||
"must_have_id" => true,
|
||||
"change_language" => true,
|
||||
),*/
|
||||
|
||||
array(
|
||||
'id' => 'instruction',
|
||||
"name" => "Hướng dẫn sử dụng",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'image',
|
||||
"name" => "Ảnh",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'variant',
|
||||
"name" => "Cấu hình",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'accessory',
|
||||
"name" => "Phụ kiện",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'addon',
|
||||
"name" => "Dịch vụ/SP đi kèm",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'video',
|
||||
"name" => "Youtube",
|
||||
),
|
||||
|
||||
/* "video-list" => array(
|
||||
"name" => "Thư viện Youtube",
|
||||
"must_have_id" => true,
|
||||
"change_language" => false,
|
||||
),*/
|
||||
|
||||
/*"relate-article" => array(
|
||||
"name" => "Nội dung liên quan",
|
||||
"must_have_id" => true,
|
||||
"change_language" => false,
|
||||
),*/
|
||||
|
||||
/*"web-link" => array(
|
||||
"name" => "So sánh giá",
|
||||
"must_have_id" => true,
|
||||
"change_language" => false,
|
||||
),*/
|
||||
|
||||
array(
|
||||
'id' => 'tag',
|
||||
"name" => "Tags",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'relation',
|
||||
"name" => "Nội dung liên quan",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'customer-group',
|
||||
"name" => "Giá theo nhóm khách hàng",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'component',
|
||||
"name" => "Thành phần",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'configurable',
|
||||
"name" => "Tùy chọn thành phần",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'compatible',
|
||||
"name" => "Sp tương thích",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'similar',
|
||||
"name" => "Sp tương tự",
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'combo-set',
|
||||
"name" => "Combo Set",
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
return array_map(function ($item) use ($current_selected){
|
||||
$copy = $item;
|
||||
$copy['is_current'] = $item['id'] == $current_selected ? 1 : 0;
|
||||
|
||||
return $copy;
|
||||
|
||||
}, $product_menu);
|
||||
}
|
||||
|
||||
1
data/product/form_components/accessory.php
Normal file
1
data/product/form_components/accessory.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/accessory_add.php
Normal file
1
data/product/form_components/accessory_add.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/addon.php
Normal file
1
data/product/form_components/addon.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/basic.php
Normal file
1
data/product/form_components/basic.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/category.php
Normal file
1
data/product/form_components/category.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/combo-set.php
Normal file
1
data/product/form_components/combo-set.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/compatible.php
Normal file
1
data/product/form_components/compatible.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/component.php
Normal file
1
data/product/form_components/component.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/component_add.php
Normal file
1
data/product/form_components/component_add.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/configurable.php
Normal file
1
data/product/form_components/configurable.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/description.php
Normal file
1
data/product/form_components/description.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/image.php
Normal file
1
data/product/form_components/image.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/instruction.php
Normal file
1
data/product/form_components/instruction.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/relation.php
Normal file
1
data/product/form_components/relation.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/seo.php
Normal file
1
data/product/form_components/seo.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/similar.php
Normal file
1
data/product/form_components/similar.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/sitemanager.php
Normal file
1
data/product/form_components/sitemanager.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/spec.php
Normal file
1
data/product/form_components/spec.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/spec_group.php
Normal file
1
data/product/form_components/spec_group.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/store.php
Normal file
1
data/product/form_components/store.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/tag.php
Normal file
1
data/product/form_components/tag.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/variant.php
Normal file
1
data/product/form_components/variant.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
1
data/product/form_components/video.php
Normal file
1
data/product/form_components/video.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
Reference in New Issue
Block a user