diff --git a/resources/beike/admin/views/pages/products/index.blade.php b/resources/beike/admin/views/pages/products/index.blade.php
index 9325b39d..eb69168f 100644
--- a/resources/beike/admin/views/pages/products/index.blade.php
+++ b/resources/beike/admin/views/pages/products/index.blade.php
@@ -144,6 +144,7 @@
@if ($product['deleted_at'] == '')
{{ __('common.edit') }}
+ index }})">{{ __('common.copy') }}
index }})">{{ __('common.delete') }}
@hook('admin.product.list.action')
@else
@@ -255,6 +256,18 @@
location = bk.objectToUrlParams(this.filter, this.url)
},
+ copyProduct(index) {
+ const id = this.productIds[index];
+
+ this.$confirm('{{ __('common.confirm_copy') }}', '{{ __('common.text_hint') }}', {
+ type: 'warning'
+ }).then(() => {
+ $http.post('products/' + id + '/copy').then((res) => {
+ this.$message.success(res.message);
+ location.reload();
+ })
+ }).catch(()=>{});
+ },
deleteProduct(index) {
const id = this.productIds[index];
@@ -265,7 +278,7 @@
this.$message.success(res.message);
location.reload();
})
- }).catch(()=>{});;
+ }).catch(()=>{});
},
restoreProduct(index) {
diff --git a/resources/lang/en/admin/builder.php b/resources/lang/en/admin/builder.php
index 342b2d6c..6af671aa 100644
--- a/resources/lang/en/admin/builder.php
+++ b/resources/lang/en/admin/builder.php
@@ -49,6 +49,7 @@ return [
'text_suggested_size' => 'Suggested size (width x height):',
'text_word' => 'Text',
'text_add_pictures' => 'Add pictures',
+ 'text_add_video' => 'Add video',
'text_refresh_cookie' => 'Refresh Cookie',
'text_popup_hint' => 'Note: When the user clicks close, it will no longer be displayed until the browser is closed and reopened. For local testing, click "Refresh Cookie", then refresh the browser, and the pop-up window can be launched again. ',
'text_cookie_refresh_success' => 'Cookie refresh successfully, refresh the browser to see the content of the pop-up window. ',
@@ -197,6 +198,7 @@ return [
'modules_content' => 'Content',
'modules_edit_content' => 'Edit content',
'modules_select_image' => 'Select image',
+ 'modules_select_video' => 'Select video',
'modules_quantity_line' => 'Display several in one line',
'modules_please_choose' => 'Please choose',
'modules_choose' => 'Choose',
diff --git a/resources/lang/en/admin/design_builder.php b/resources/lang/en/admin/design_builder.php
index 3be6e263..149bd2fc 100644
--- a/resources/lang/en/admin/design_builder.php
+++ b/resources/lang/en/admin/design_builder.php
@@ -14,6 +14,7 @@ return [
'module_banner' => 'Banner',
'module_four_image_pro' => 'For Image PRO',
'module_slideshow' => 'Slideshow',
+ 'module_slideshow_video'=> 'SlideshowVideo',
'module_tab_products' => 'Tab Products',
'module_product' => 'Products',
'module_icons' => 'Icons',
diff --git a/resources/lang/en/admin/product.php b/resources/lang/en/admin/product.php
index 7c748db6..a41d82a7 100644
--- a/resources/lang/en/admin/product.php
+++ b/resources/lang/en/admin/product.php
@@ -45,6 +45,7 @@ return [
'default_main_product' => 'Default main product',
'modify_order' => 'Double-click to modify, drag to adjust the order',
'weight_text' => 'weight',
+ 'length_width_height' => 'Length, width and height',
'weight_class' => 'weight unit',
'confirm_batch_product' => 'Are you sure you want to delete the selected products in batches? ',
diff --git a/resources/lang/en/common.php b/resources/lang/en/common.php
index b4f71fb5..ea550fb0 100644
--- a/resources/lang/en/common.php
+++ b/resources/lang/en/common.php
@@ -22,6 +22,7 @@ return [
'deleted_success' => 'Deleted Successfully!',
'restored_success' => 'Restore Successfully!',
'updated_success' => 'Updated Successfully!',
+ 'copy_success' => 'Copy Successfully!',
'edit_success' => 'Modify Success!',
'get_success' => 'Get Successfully!',
'all' => 'All',
@@ -47,12 +48,14 @@ return [
'reset' => 'Reset',
'export' => 'Export',
'edit' => 'Edit',
+ 'copy' => 'Copy',
'action' => 'Action',
'add' => 'Add',
'please_choose' => 'Please Choose',
'recommend_size' => 'Recommend Size',
'pick_datetime' => 'Pick Datetime',
'confirm_delete' => 'You sure you want to delete it?',
+ 'confirm_copy' => 'You sure you want to copy it?',
'text_hint' => 'Hint',
'restore' => 'Restore',
'name' => 'Name',
diff --git a/resources/lang/zh_cn/admin/builder.php b/resources/lang/zh_cn/admin/builder.php
index 6c0132dd..8fb24d5f 100644
--- a/resources/lang/zh_cn/admin/builder.php
+++ b/resources/lang/zh_cn/admin/builder.php
@@ -49,6 +49,7 @@ return [
'text_suggested_size' => '建议尺寸(宽x高): ',
'text_word' => '文字',
'text_add_pictures' => '添加图片',
+ 'text_add_video' => '添加视频',
'text_refresh_cookie' => '刷新 Cookie',
'text_popup_hint' => '注:用户点击关闭将不再显示,直到浏览器关闭重新打开。本地测试可点击 "刷新 Cookie",后刷新浏览器,弹窗可再次启动。 ',
'text_cookie_refresh_success' => 'Cookie 刷新成功,刷新浏览器即可看到弹窗内容。',
@@ -197,6 +198,7 @@ return [
'modules_content' => '内容',
'modules_edit_content' => '编辑内容',
'modules_select_image' => '选择图片',
+ 'modules_select_video' => '选择视频',
'modules_quantity_line' => '一行显示几个',
'modules_please_choose' => '请选择',
'modules_choose' => '选择',
diff --git a/resources/lang/zh_cn/admin/design_builder.php b/resources/lang/zh_cn/admin/design_builder.php
index 9a91fe5c..92acc4fd 100644
--- a/resources/lang/zh_cn/admin/design_builder.php
+++ b/resources/lang/zh_cn/admin/design_builder.php
@@ -14,6 +14,7 @@ return [
'module_banner' => '横幅模块',
'module_four_image_pro' => '一行四图 PRO',
'module_slideshow' => '幻灯片模块',
+ 'module_slideshow_video'=> '视频模块',
'module_tab_products' => '选项卡商品',
'module_product' => '商品模块',
'module_icons' => '图标模块',
diff --git a/resources/lang/zh_cn/admin/product.php b/resources/lang/zh_cn/admin/product.php
index a658ab74..e223eb44 100644
--- a/resources/lang/zh_cn/admin/product.php
+++ b/resources/lang/zh_cn/admin/product.php
@@ -45,6 +45,7 @@ return [
'default_main_product' => '默认主商品',
'modify_order' => '双击修改、拖动调整顺序',
'weight_text' => '重量',
+ 'length_width_height' => '长宽高',
'weight_class' => '重量单位',
'confirm_batch_product' => '确认要批量删除选中的商品吗?',
diff --git a/resources/lang/zh_cn/common.php b/resources/lang/zh_cn/common.php
index 4e83b3ed..388a09f2 100644
--- a/resources/lang/zh_cn/common.php
+++ b/resources/lang/zh_cn/common.php
@@ -21,6 +21,7 @@ return [
'deleted_success' => '删除成功!',
'restored_success' => '恢复成功!',
'updated_success' => '更新成功!',
+ 'copy_success' => '复制成功!',
'edit_success' => '修改成功!',
'get_success' => '获取成功!',
'all' => '全部',
@@ -46,12 +47,14 @@ return [
'reset' => '重置',
'export' => '导出',
'edit' => '编辑',
+ 'copy' => '复制',
'action' => '操作',
'add' => '添加',
'please_choose' => '请选择',
'recommend_size' => '建议尺寸',
'pick_datetime' => '选择时间',
'confirm_delete' => '确定要删除吗?',
+ 'confirm_copy' => '确定要复制吗?',
'text_hint' => '提示',
'restore' => '恢复',
'name' => '名称',
diff --git a/resources/lang/zh_hk/admin/product.php b/resources/lang/zh_hk/admin/product.php
index 4f36f53e..95130ab9 100644
--- a/resources/lang/zh_hk/admin/product.php
+++ b/resources/lang/zh_hk/admin/product.php
@@ -40,6 +40,7 @@ return [
'default_main_product' => '默認主商品',
'modify_order' => '雙擊修改、拖動調整順序',
'weight_text' => '重量',
+ 'length_width_height' => '长宽高',
'weight_class' => '重量單位',
'confirm_batch_product' => '確認要批量刪除選中的商品嗎? ',
diff --git a/themes/default/design/slideshow.blade.php b/themes/default/design/slideshow.blade.php
index 1908c192..40b41e34 100644
--- a/themes/default/design/slideshow.blade.php
+++ b/themes/default/design/slideshow.blade.php
@@ -53,4 +53,4 @@
slideshowSwiper();
@endif
-
\ No newline at end of file
+
diff --git a/themes/default/design/slideshow_video.blade.php b/themes/default/design/slideshow_video.blade.php
new file mode 100644
index 00000000..7919b700
--- /dev/null
+++ b/themes/default/design/slideshow_video.blade.php
@@ -0,0 +1,61 @@
+@push('header')
+
+
+@endpush
+
+
+ @include('design._partial._module_tool')
+
+
+
+
+ @foreach($content['images'] as $image)
+
+ @endforeach
+
+
+
+
+
+
+
+
+
diff --git a/themes/default/product/product.blade.php b/themes/default/product/product.blade.php
index 124e19f2..2d8b3295 100644
--- a/themes/default/product/product.blade.php
+++ b/themes/default/product/product.blade.php
@@ -10,8 +10,8 @@
-
-
+
+
@if ($product['video'])
diff --git a/themes/default/shared/product.blade.php b/themes/default/shared/product.blade.php
index 099ff868..a766c77e 100644
--- a/themes/default/shared/product.blade.php
+++ b/themes/default/shared/product.blade.php
@@ -40,7 +40,7 @@
data-bs-placement="top"
title="{{ __('shop/products.add_to_cart') }}"
@if ($product['price_setting'] === 'num')
- onclick="bk.addCart({sku_id: '{{ $product['sku_id'] }}',quantity: {{$product['numprices'][0]['num']}} }, this)">
+ onclick="bk.addCart({sku_id: '{{ $product['sku_id'] }}',quantity: {{$product['numprices'] != [] ? $product['numprices'][0]['num'] : 1}} }, this)">
@else
onclick="bk.addCart({sku_id: '{{ $product['sku_id'] }}'}, this)">
@endif
@@ -71,7 +71,7 @@
@if ($product['price_setting'] === 'num')
- {{$product['numprices'][0]['num']}} pieces
+ {{$product['numprices'] != [] ? $product['numprices'][0]['num'] : 1}} pieces
@else
1 pieces
@endif
|