diff --git a/plugins/romanah/bagisto/components/Seller.php b/plugins/romanah/bagisto/components/Seller.php index 4bb86be..0898b2f 100644 --- a/plugins/romanah/bagisto/components/Seller.php +++ b/plugins/romanah/bagisto/components/Seller.php @@ -56,15 +56,6 @@ class Seller extends ComponentBase return $dataqq; } - function onUploadImg() - { - // $dataInput = post(); - $file = files('image'); - dd($file); - // Request::validate([ - // 'image.*' => 'required|image|max:1024', - // ]); - } function onUpdateSellerProd() { diff --git a/themes/nurgul/partials/seller/prod-card.htm b/themes/nurgul/partials/seller/prod-card.htm index 7ac12e7..e5f0b7e 100755 --- a/themes/nurgul/partials/seller/prod-card.htm +++ b/themes/nurgul/partials/seller/prod-card.htm @@ -2,22 +2,22 @@
- Midone - HTML Admin Template + {{name}} -
{{name}} Smartphone & Tablet
+
{{name}} {{'prod.featured.title'|_}}: {{featured}}
-
Bahasy: {{price}}
-
Remaining Stock: {{qty}}
-
Status: {{status}}
+ +
{{'stock.title'|_}}: {{qty}}
+
{{'status.title'|_}}: {{status}}
- Preview - Edit - Delete + {{price}} + {{'product.edit'|_}} + {{'product.delete'|_}}
diff --git a/themes/nurgul/partials/seller/prod-update.htm b/themes/nurgul/partials/seller/prod-update.htm index aea9240..01b5da1 100755 --- a/themes/nurgul/partials/seller/prod-update.htm +++ b/themes/nurgul/partials/seller/prod-update.htm @@ -10,138 +10,122 @@
- {{ form_ajax('onUpdateSellerProd') }} -
- - -
-
-
- - +
+
+ +
+
+
+ + +
- - -
-
-
- - -
-
- - -
-
- -
- -
- -
-
- -
- -
- -
-
- - -
-
- -
- -
TMT
+
+
+ + +
+
+ +
- -
- -
- -
TMT
+
+ +
+
+
+
+
Drop files here or click to upload.
+
This is just a demo dropzone. Selected files are not actually uploaded.
+
+
+
+
+ +
+
-
- -
- - -
- -
- {{'order.form.cancel.btn'|_}} - -
- {{ form_close() }} -
- -
- -
- -
+
+ +
+ +
+
+ - - + + + + +
+
+ +
+ +
TMT
+
+
+ + +
+ +
+ +
TMT
+
+
+ +
+ +
+ + +
- + {{'order.form.cancel.btn'|_}} +
- - -
- -
- - {{ form_ajax('onUpdateSellesrProd') }} - -
-
- - -
- - -
- - -
- {{ form_close() }} -
+ +
@@ -150,8 +134,6 @@ {% put scripts %} - - + + + {% endput %} diff --git a/themes/nurgul/partials/sellerApi/getProducts.htm b/themes/nurgul/partials/sellerApi/getProducts.htm index c1286bb..1cbaa3f 100755 --- a/themes/nurgul/partials/sellerApi/getProducts.htm +++ b/themes/nurgul/partials/sellerApi/getProducts.htm @@ -22,10 +22,25 @@ console.log(data.data); var products = data.data; - var testq = ""; + var prodFeatured = ""; + var prodImg = ""; + for (var product of products) { + + if(product.featured){ + prodFeatured = "HAWA"; + }else{ + prodFeatured = "ÝOK"; + } + + if(product.images.length > 0){ + prodImg = product.images[0].original_image_url; + }else{ + prodImg = `{{'assets/no_img.jpg'|theme}}`; + } + // console.log(product.hasOwnProperty('special_price')); - $('#products_{{id}}').append(`{% partial "seller/prod-card" qty="`+product.qty+`" status="`+product.status+`" id="`+product.id+`" new="`+product.new+`" name="`+product.name+`" price="`+product.formatted_price+`" %}`); + $('#products_{{id}}').append(`{% partial "seller/prod-card" featured="`+ prodFeatured +`" price="`+product.formatted_price+`" qty="`+product.qty+`" status="`+product.status+`" id="`+product.id+`" new="`+product.new+`" name="`+product.name+`" price="`+product.formatted_price+`" img="`+prodImg+`" %}`); } }, error: function (xhr, textStatus, errorThrown) {