Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TH-109: Meraki: > Create max inventory popup alert #67

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions themes/meraki/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,9 @@ textarea{
.yc-alert.error{
background-color:var(--yc-error-color);
}
.yc-alert.warning{
background-color:var(--yc-warning-color);
}
.yc-alert.show{
opacity:1;
z-index:9999;
Expand Down
3 changes: 2 additions & 1 deletion themes/meraki/locales/ar.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@
"quantity_smaller_than_zero": "يجب أن تكون الكمية أكبر من 0",
"upload_image": "الرجاء تحميل صورة",
"product_added": "تمت إضافة المنتج بنجاح",
"empty_inventory": "المُنتج غير متوفر حاليًا في المخزون"
"empty_inventory": "المُنتج غير متوفر حاليًا في المخزون",
"max_quantity": "الكمية المتاحة لهذا العرض هي: "
},
"page": {
"contact": {
Expand Down
3 changes: 2 additions & 1 deletion themes/meraki/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@
"quantity_smaller_than_zero": "Quantity must be greater than 0",
"upload_image": "Please upload an image",
"product_added": "Product has been added successfully",
"empty_inventory": "Product out of stock"
"empty_inventory": "Product out of stock",
"max_quantity": "The available quantity for this variant is: "
},
"page": {
"contact": {
Expand Down
3 changes: 2 additions & 1 deletion themes/meraki/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@
"quantity_smaller_than_zero": "La quantité doit être supérieure à 0",
"upload_image": "Veuillez télécharger une image",
"product_added": "Produit ajouté avec succès",
"empty_inventory": "Produit en rupture de stock"
"empty_inventory": "Produit en rupture de stock",
"max_quantity": "La quantité disponible pour cette variante est : "
},
"page": {
"contact": {
Expand Down
4 changes: 4 additions & 0 deletions themes/meraki/snippets/alert.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
name='checkmark-circle-outline'
class='text-xl icon-success icon'
></ion-icon>
<ion-icon
name="warning-outline"
class='text-xl icon-warning icon'
></ion-icon>
<span class='alert-msg text-white'> Some context </span>
</div>
6 changes: 4 additions & 2 deletions themes/meraki/snippets/cart-drawer.liquid
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{ 'cart-drawer.css' | asset_url | stylesheet_tag }}

<input id='cartQuantity' type='hidden'>
<div class="cart-overlay"></div>
<div class="cart-drawer">
<button class="cart-drawer__close" aria-label='close'>
Expand All @@ -18,7 +19,8 @@
quantity_smaller_than_zero: "{{ 'errors.quantity_smaller_than_zero' | t }}",
upload_image: "{{ 'errors.upload_image' | t }}",
product_added: "{{ 'errors.product_added' | t }}",
empty_inventory: "{{ 'errors.empty_inventory' | t }}"
empty_inventory: "{{ 'errors.empty_inventory' | t }}",
max_quantity: "{{ 'errors.max_quantity' | t }}",
}

const CART_DRAWER_TRANSLATION = {
Expand All @@ -28,7 +30,7 @@
checkoutPayment: '{{ 'cart.summary.checkout_cta' | t }}',
emptyCart: '{{ 'cart.empty_cart' | t }}',
itemsName: '{{ 'cart.items.items_name' | t }}',
continueShopping: '{{ 'cart.summary.continue_shppping' | t }}',
continueShopping: '{{ 'cart.summary.continue_shppping' | t }}',
}

{% endjavascript %}
Expand Down
4 changes: 4 additions & 0 deletions themes/meraki/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,10 @@ textarea {
background-color: var(--yc-error-color);
}

&.warning {
background-color: var(--yc-warning-color);
}

&.show {
opacity: 1;
z-index: 9999;
Expand Down