Skip to content

Commit

Permalink
Merge branch 'main' into fix-page-section-width
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenekasimov authored Mar 8, 2023
2 parents cb79a6d + cfefdd7 commit d357131
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions assets/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CartItems extends HTMLElement {
}

onCartUpdate() {
fetch('/cart?section_id=main-cart-items')
fetch(`${routes.cart_url}?section_id=main-cart-items`)
.then((response) => response.text())
.then((responseText) => {
const html = new DOMParser().parseFromString(responseText, 'text/html');
Expand Down Expand Up @@ -116,9 +116,9 @@ class CartItems extends HTMLElement {
if (cartDrawerWrapper) cartDrawerWrapper.classList.toggle('is-empty', parsedState.item_count === 0);

this.getSectionsToRender().forEach((section => {
const elementToReplace =
const elementToReplace =
document.getElementById(section.id).querySelector(section.selector) || document.getElementById(section.id);
elementToReplace.innerHTML =
elementToReplace.innerHTML =
this.getSectionInnerHTML(parsedState.sections[section.section], section.selector);
}));
const updatedValue = parsedState.items[line - 1] ? parsedState.items[line - 1].quantity : undefined;
Expand Down
2 changes: 1 addition & 1 deletion locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@
"orders": {
"title": "Lịch sử đặt hàng",
"order_number": "Đơn hàng",
"order_number_link": "Đơn hàng số {{ number }}",
"order_number_link": "Mã đơn hàng {{ number }}",
"date": "Ngày",
"payment_status": "Trạng thái thanh toán",
"fulfillment_status": "Trạng thái thực hiện",
Expand Down

0 comments on commit d357131

Please sign in to comment.