{"id":158,"date":"2022-11-30T18:07:58","date_gmt":"2022-11-30T10:07:58","guid":{"rendered":"https:\/\/beautygarden.techmaker.com.my\/cart\/"},"modified":"2026-06-28T20:12:25","modified_gmt":"2026-06-28T12:12:25","slug":"cart","status":"publish","type":"page","link":"https:\/\/yrfloral.com.my\/ch\/cart\/","title":{"rendered":"\u8d2d\u7269\u8f66"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"158\" class=\"elementor elementor-158\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-a3344f4 elementor-section-height-min-height elementor-section-full_width elementor-section-height-default elementor-section-items-middle\" data-id=\"a3344f4\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t\t<div class=\"elementor-background-overlay\"><\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-55ab8fe\" data-id=\"55ab8fe\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-768b950 elementor-widget elementor-widget-heading\" data-id=\"768b950\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Cart<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t<div class=\"elementor-element elementor-element-b03ae47 e-flex e-con-boxed e-con e-parent\" data-id=\"b03ae47\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-463e208 elementor-widget elementor-widget-html\" data-id=\"463e208\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\n\/* ==========================================\n   1. \u4f60\u539f\u672c\u5b8c\u7f8e\u7684\u6837\u5f0f\uff08\u5b8c\u5168\u4fdd\u7559\uff0c\u65e0\u4efb\u4f55\u4fee\u6539\uff09\n   ========================================== *\/\n.quantity {\n  display: inline-flex !important;\n  align-items: center !important;\n  border: 2px solid rgba(0,0,0,0.1) !important;\n  border-radius: 7px !important;\n  overflow: hidden !important;\n  background: transparent !important;\n}\n\n.quantity .qty {\n  width: 40px !important;\n  height: 32px !important;\n  text-align: center !important;\n  border: none !important;\n  border-left: 2px solid rgba(0,0,0,0.1) !important;\n  border-right: 2px solid rgba(0,0,0,0.1) !important;\n  outline: none !important;\n  background: transparent !important;\n  font-size: 14px !important;\n  font-weight: 500 !important;\n}\n\n.quantity .qty::-webkit-outer-spin-button,\n.quantity .qty::-webkit-inner-spin-button {\n  -webkit-appearance: none;\n  margin: 0;\n}\n\n.quantity .qty-minus,\n.quantity .qty-plus {\n  display: flex !important;\n  align-items: center;\n  justify-content: center;\n  width: auto !important;\n  height: 32px !important;\n  padding: 0 10px !important;\n  border: none !important;\n  background: transparent !important;\n  font-size: 16px !important;\n  font-weight: 500 !important;\n  color: #5e7783 !important;\n  cursor: pointer;\n}\n\n.quantity .qty-minus:hover,\n.quantity .qty-plus:hover {\n  background: rgba(0,0,0,0.05) !important;\n}\n\n.quantity .qty-minus {\n  border-right: none !important;\n}\n\n.quantity .qty-plus {\n  border-left: none !important;\n}\n\n.quantity .qty-minus::after,\n.quantity .qty-plus::after {\n  content: none !important;\n}\n\n\/* ==========================================\n   \u2728 2. \u65b0\u589e\uff1a\u5168\u5c40\u5c40\u90e8\u5237\u65b0\u89c6\u89c9\u53cd\u9988\u52a8\u753b\n   ========================================== *\/\n.cart-loading-effect {\n  opacity: 0.5 !important;\n  pointer-events: none !important; \/* \u5237\u65b0\u671f\u95f4\u7981\u6b62\u91cd\u590d\u70b9\u51fb\uff0c\u9632\u6b62\u72c2\u70b9\u5361\u6b7b *\/\n  transition: opacity 0.2s ease-in-out;\n}\n<\/style>\n\n<script>\njQuery(function($){\n\n  \/\/ \ud83d\udee1\ufe0f \u9632\u5fa1\u6027\u4fee\u590d\n  if (typeof $.fn.block !== 'function') {\n    $.fn.block = function() { return this; };\n    $.fn.unblock = function() { return this; };\n  }\n\n  function initQty(){\n    $('.quantity').each(function(){\n      const $wrap = $(this);\n      if ($wrap.find('.qty-minus').length) return;\n      const $input = $wrap.find('.qty');\n\n      $input.before('<button type=\"button\" class=\"qty-minus\">-<\/button>');\n      $input.after('<button type=\"button\" class=\"qty-plus\">+<\/button>');\n    });\n  }\n\n  function bindEvents(){\n    \/\/ \u2795\n    $(document).off('click', '.qty-plus').on('click', '.qty-plus', function(){\n      const $input = $(this).siblings('.qty');\n      let val = parseInt($input.val()) || 1;\n\n      $input.val(val + 1);\n      updateCart($input);\n    });\n\n    \/\/ \u2796\n    $(document).off('click', '.qty-minus').on('click', '.qty-minus', function(){\n      const $input = $(this).siblings('.qty');\n      let val = parseInt($input.val()) || 1;\n      let min = parseInt($input.attr('min')) || 1;\n\n      if (val > min) {\n        $input.val(val - 1);\n        updateCart($input);\n      }\n    });\n  }\n\n  function updateCart($input){\n    $input.trigger('change');\n\n    \/\/ \ud83c\udfac \u2728 \u5bfb\u627e\u9700\u8981\u52a0\u4e0a\u201c\u5237\u65b0\u4e2d...\u201d\u6548\u679c\u7684\u5bb9\u5668\n    \/\/ \u4f18\u5148\u627e Elementor Mini Cart \u5bb9\u5668\uff0c\u6216\u8005\u666e\u901a\u8d2d\u7269\u8f66\u8868\u5355\uff0c\u627e\u4e0d\u5230\u5c31\u76f4\u63a5\u8ba9\u5f53\u524d\u6570\u91cf\u6846\u534a\u900f\u660e\n    const $target = $input.closest('.elementor-menu-cart__wrapper, .woocommerce-cart-form, .widget_shopping_cart, .quantity');\n    $target.addClass('cart-loading-effect');\n\n    const $updateBtn = $('button[name=\"update_cart\"]');\n\n    \/\/ \ud83d\udc49 \u5982\u679c\u5b58\u5728\u4f20\u7edf\u7684\u201c\u66f4\u65b0\u8d2d\u7269\u8f66\u201d\u6309\u94ae\uff08\u4e3b\u8d2d\u7269\u8f66\u9875\u9762\uff09\n    if ($updateBtn.length) {\n      $updateBtn.prop('disabled', false);\n\n      clearTimeout(window.cartTimer);\n      window.cartTimer = setTimeout(function(){\n        $updateBtn.trigger('click');\n      }, 100); \n    } \n    \/\/ \ud83d\udc49 \u5982\u679c\u662f Mini Cart \/ Widget \u533a\u57df\uff08\u6ca1\u6709\u66f4\u65b0\u6309\u94ae\uff09\n    else {\n      clearTimeout(window.cartTimer);\n      window.cartTimer = setTimeout(function(){\n        $(document.body).trigger('wc_update_cart');\n      }, 100);\n    }\n  }\n\n  function initAll(){\n    initQty();\n    bindEvents();\n  }\n\n  \/\/ \ud83d\ude80 \u521d\u59cb\n  initAll();\n\n  \/\/ \ud83d\ude80 \u2728 \u5f53 WooCommerce AJAX \u5237\u65b0\u5b8c\u6bd5\u540e\uff0c\u79fb\u9664\u6240\u6709\u201c\u5237\u65b0\u4e2d\u201d\u7684\u534a\u900f\u660e\u6548\u679c\n  $(document.body).on('updated_cart_totals wc_fragments_refreshed updated_fragments', function(){\n    $('.cart-loading-effect').removeClass('cart-loading-effect');\n    initAll();\n  });\n\n  \/\/ \ud83d\ude80 \u6700\u5173\u952e\uff1a\u76d1\u542c DOM \u53d8\u5316\n  let observerTimer;\n  const observer = new MutationObserver(function(){\n    clearTimeout(observerTimer);\n    observerTimer = setTimeout(initAll, 50);\n  });\n\n  observer.observe(document.body, {\n    childList: true,\n    subtree: true\n  });\n\n});\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Cart Remove item Thumbnail image Product Price Quantity Subtotal &times; Carnation Bouquet To: Qiao ying From: Qiao yin Recipient Phone Number: 0185778828 &#82;&#77;28.00 Carnation Bouquet quantity &#82;&#77;84.00 Apply coupon Cart Totals Subtotal &#82;&#77;84.00 Shipment Perak (7.5 km): &#82;&#77;10.00 Local pickup Shipping to 17, Jalan Pengkalan Barat 24, Ipoh, Perak, 31650. Change address Country \/ region [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-158","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/yrfloral.com.my\/ch\/wp-json\/wp\/v2\/pages\/158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yrfloral.com.my\/ch\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/yrfloral.com.my\/ch\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/yrfloral.com.my\/ch\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yrfloral.com.my\/ch\/wp-json\/wp\/v2\/comments?post=158"}],"version-history":[{"count":249,"href":"https:\/\/yrfloral.com.my\/ch\/wp-json\/wp\/v2\/pages\/158\/revisions"}],"predecessor-version":[{"id":6972,"href":"https:\/\/yrfloral.com.my\/ch\/wp-json\/wp\/v2\/pages\/158\/revisions\/6972"}],"wp:attachment":[{"href":"https:\/\/yrfloral.com.my\/ch\/wp-json\/wp\/v2\/media?parent=158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}