diff --git a/includes/api/api.php b/includes/api/api.php index 947cb84c..3c0a89cd 100644 --- a/includes/api/api.php +++ b/includes/api/api.php @@ -225,6 +225,27 @@ function addMagicCheckoutSettingFields(&$defaultFormFields) 'label' => __('Allow customers to create store Account'), 'default' => 'No', ), + 'enable_dual_checkout_oncart' => array( + 'title' => __('Activate Dual checkout on cart'), + 'type' => 'checkbox', + 'description' => "Activate Dual checkout on cart page", + 'label' => __('Activate Dual checkout on cart'), + 'default' => 'yes', + ), + 'enable_dual_checkout_onpdp' => array( + 'title' => __('Activate Dual checkout on Buynow'), + 'type' => 'checkbox', + 'description' => "Activate Dual checkout on Product description Page", + 'label' => __('Activate Dual checkout on Buynow'), + 'default' => 'yes', + ), + 'enable_dual_checkout_minicart' => array( + 'title' => __('Activate Dual checkout on minicart'), + 'type' => 'checkbox', + 'description' => 'Activate Dual checkout on minicart', + 'label' => __('Activate Dual checkout on minicart'), + 'default' => 'yes', + ), ); $defaultFormFields = array_merge($defaultFormFields, $magicCheckoutConfigFields); diff --git a/includes/api/coupon-get.php b/includes/api/coupon-get.php index 5353e900..53bc55d3 100755 --- a/includes/api/coupon-get.php +++ b/includes/api/coupon-get.php @@ -72,15 +72,15 @@ function getCouponList($request) ); //check woo-discount-rule plugin disabling the coupons - if (is_plugin_active('woo-discount-rules/woo-discount-rules.php')) { - $discountOptions = get_option('woo-discount-config-v2', []); - if (!empty($discountOptions)) { - $isCouponEnabled = $discountOptions['disable_coupon_when_rule_applied']; - if ($isCouponEnabled == 'disable_coupon') { - $args = array(); - } - } - } + // if (is_plugin_active('woo-discount-rules/woo-discount-rules.php')) { + // $discountOptions = get_option('woo-discount-config-v2', []); + // if (!empty($discountOptions)) { + // $isCouponEnabled = $discountOptions['disable_coupon_when_rule_applied']; + // if ($isCouponEnabled == 'disable_coupon') { + // $args = array(); + // } + // } + // } $coupons = new WP_Query($args); @@ -229,14 +229,27 @@ function getCouponList($request) // Cleanup cart. WC()->cart->empty_cart(); create1ccCart($orderId); - $smartCoupon = new Wt_Smart_Coupon_Public(" ", " "); + + // if(class_exists('Wt_Smart_Coupon_Restriction_Public')){ + // $items = WC()->cart->get_cart(); + // $quantityMatchingProduct = get_quantity_of_product($coupon, $items,[], []); + // $subtotalMatchingProduct = get_sub_total_of_products($coupon, $items, [], []); + + // }else{ + // $smartCoupon = new Wt_Smart_Coupon_Public(" ", " "); + // $quantityMatchingProduct = $smartCoupon->get_quantity_of_matching_product($coupon); + // $subtotalMatchingProduct = $smartCoupon->get_sub_total_of_matching_products($coupon); + + // } + + $items = WC()->cart->get_cart(); // Quantity of matching Products $minMatchingProductQty = get_post_meta($coupon->get_id(), '_wt_min_matching_product_qty', true); $maxMatchingProductQty = get_post_meta($coupon->get_id(), '_wt_max_matching_product_qty', true); if ($minMatchingProductQty > 0 || $maxMatchingProductQty > 0) { - $quantityMatchingProduct = $smartCoupon->get_quantity_of_matching_product($coupon); + $quantityMatchingProduct = get_quantity_of_product($coupon, $items,[], []); if ($minMatchingProductQty > 0 && $quantityMatchingProduct < $minMatchingProductQty) { continue; } @@ -245,12 +258,12 @@ function getCouponList($request) } } - // Subtotal of matching products + //Subtotal of matching products $minMatchingProductSubtotal = get_post_meta($coupon->get_id(), '_wt_min_matching_product_subtotal', true); $maxMatchingProductSubtotal = get_post_meta($coupon->get_id(), '_wt_max_matching_product_subtotal', true); if ($minMatchingProductSubtotal !== 0 || $maxMatchingProductSubtotal !== 0) { - $subtotalMatchingProduct = $smartCoupon->get_sub_total_of_matching_products($coupon); + $subtotalMatchingProduct = get_sub_total_of_products($coupon, $items, [], []); if ($minMatchingProductSubtotal > 0 && $subtotalMatchingProduct < $minMatchingProductSubtotal) { continue; } @@ -305,3 +318,111 @@ function transformAmountForRzp($amount) { return wc_format_decimal($amount, 2) * 100; } + +function get_quantity_of_product($coupon, $items, $couponProducts, $couponCategories, $couponExcludeProducts = array(), $couponExcludeCategories = array()) +{ + global $woocommerce; + $qty = 0; + + $isProductRestrictionEnabled=count($couponProducts)>0; + $isCategoryRestrictionEnabled=count($couponCategories)>0; + + foreach($items as $item) + { + if(isset($item['free_product']) && "wt_give_away_product"===$item['free_product']) + { + continue; + } + + $itemQuantity=0; //always reset to zero on loop start + + if($isProductRestrictionEnabled) + { + if(in_array($item['product_id'], $couponProducts) || in_array($item['variation_id'], $couponProducts)) + { + $itemQuantity = $item['quantity']; + } + } + + if(0===$itemQuantity && $isCategoryRestrictionEnabled) /* not already in coupon products and category restriction enabled */ + { + $productCats = wc_get_product_cat_ids($item['product_id']); + + if(count(array_intersect($couponCategories, $productCats))>0) + { + if(0 === count(array_intersect($couponExcludeCategories, $productCats))) + { + $itemQuantity = $item['quantity']; + } + } + } + + + if(!$isProductRestrictionEnabled && !$isCategoryRestrictionEnabled) + { + $productCats = wc_get_product_cat_ids($item['product_id']); + + if(!empty($couponExcludeCategories) || !empty($couponExcludeProducts)) + { + + if(in_array($item['product_id'], $couponExcludeProducts) || in_array($item['variation_id'], $couponExcludeProducts)) + { + continue; + + }elseif(0 < count(array_intersect($couponExcludeCategories, $productCats))) + { + continue; + }else + { + //not included in excluded product/category + $itemQuantity = $item['quantity']; + } + + }else + { + $itemQuantity = $item['quantity']; + } + + } + + $qty += $itemQuantity; + } + + return $qty; +} + +function get_sub_total_of_products($coupon,$items, $couponProducts, $couponCategories) +{ + global $woocommerce; + $total = 0; + + $isProductRestrictionEnabled=count($couponProducts)>0; + $isCategoryRestrictionEnabled=count($couponCategories)>0; + + if($isProductRestrictionEnabled || $isCategoryRestrictionEnabled) // check with matching products by include condition. + { + foreach($items as $item) + { + if(isset($item['free_product']) && "wt_give_away_product" === $item['free_product']) + { + continue; + } + + $productCats = wc_get_product_cat_ids($item['product_id']); + + if(($isProductRestrictionEnabled && in_array($item['product_id'], $couponProducts)) || ($isCategoryRestrictionEnabled && count(array_intersect($couponCategories,$productCats)) > 0)) + { + $total += (float) $item['data']->get_price() * (int) $item['quantity']; + } + } + + }else + { + foreach( $items as $item ) + { + $total += (float) $item['data']->get_price() * (int) $item['quantity']; + } + } + + return $total; +} diff --git a/includes/stylehandler.php b/includes/stylehandler.php new file mode 100755 index 00000000..e7266c03 --- /dev/null +++ b/includes/stylehandler.php @@ -0,0 +1,13 @@ + diff --git a/includes/utils.php b/includes/utils.php index 4e78bfbf..539ce09c 100644 --- a/includes/utils.php +++ b/includes/utils.php @@ -75,6 +75,31 @@ function isMandatoryAccCreationEnabled() && 'yes' == get_option('woocommerce_razorpay_settings')['1cc_account_creation'] ); } + +function isDualMiniCartCheckoutEnabled() +{ + return ( + empty(get_option('woocommerce_razorpay_settings')['enable_dual_checkout_minicart']) === false + && 'yes' == get_option('woocommerce_razorpay_settings')['enable_dual_checkout_minicart'] + ); +} + +function isDualPdpCheckoutEnabled() +{ + return ( + empty(get_option('woocommerce_razorpay_settings')['enable_dual_checkout_onpdp']) === false + && 'yes' == get_option('woocommerce_razorpay_settings')['enable_dual_checkout_onpdp'] + ); +} + +function isDualCartCheckoutEnabled() +{ + return ( + empty(get_option('woocommerce_razorpay_settings')['enable_dual_checkout_oncart']) === false + && 'yes' == get_option('woocommerce_razorpay_settings')['enable_dual_checkout_oncart'] + ); +} + function validateInput($route, $param) { $failure_reason = null; diff --git a/public/css/1cc-product-checkout.css b/public/css/1cc-product-checkout.css old mode 100644 new mode 100755 diff --git a/public/css/astra.css b/public/css/astra.css new file mode 100644 index 00000000..2025aceb --- /dev/null +++ b/public/css/astra.css @@ -0,0 +1,92 @@ +#btn-1cc { + display: block !important; + width: 100%; +} +#btn-1cc-mini-cart { + display: block !important; + width: 100%; +} +#btn-1cc-pdp { + position: relative; + top: 10px; + display: block !important; + width: 220px; + border-radius: 2px; + overflow: hidden; +} +#rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; +} +#rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; +} +#rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; +} +#rzp-spinner.show { + visibility: visible; + opacity: 1; +} +@keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } +} +#loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + margin-top: 2px; + box-sizing: content-box; +} +#icon { + position: absolute; +} +#rzp-logo{ + width: auto; + height: 80px !important; +} +@media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } +} + +.single_add_to_cart_button.button{ + z-index: 2 !important; + } + + .quantity{ + z-index: 2 !important; + } \ No newline at end of file diff --git a/public/css/bigstore.css b/public/css/bigstore.css new file mode 100644 index 00000000..25e78408 --- /dev/null +++ b/public/css/bigstore.css @@ -0,0 +1,110 @@ +#btn-1cc { + display: block !important; + width: 100%; +} +#btn-1cc-mini-cart { + display: block !important; + width: 100%; +} +#btn-1cc-pdp { + display:block !important; + position: relative; + top: 12px; + width: 352px; +} +#rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; +} +#rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; +} +#rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; +} +#rzp-spinner.show { + visibility: visible; + opacity: 1; +} +@keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } +} +#loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + margin-top: 2px; + box-sizing: content-box; +} +#icon { + position: absolute; +} +#rzp-logo{ + width: auto; + height: 80px !important; +} +@media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } +} + +@media screen and (max-width: 1024px){ + + #btn-1cc-pdp{ + width: 323px; + padding-top: 20px; + } + +} + +@media screen and (max-width: 767px){ + #btn-1cc-pdp{ + width: 232px; + padding-top: 20px; + } + +} + + +.single_add_to_cart_button.button{ + z-index: 2 !important; + } + + .quantity{ + z-index: 2 !important; + } + + diff --git a/public/css/blossomshop.css b/public/css/blossomshop.css new file mode 100644 index 00000000..0297cfb9 --- /dev/null +++ b/public/css/blossomshop.css @@ -0,0 +1,91 @@ +#btn-1cc { + display: block !important; + width: 100%; +} +#btn-1cc-mini-cart { + display: block !important; + width: 100%; +} +#btn-1cc-pdp { + display:block !important; + position: relative; + top: 11px; + width: 241px; +} +#rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; +} +#rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; +} +#rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; +} +#rzp-spinner.show { + visibility: visible; + opacity: 1; +} +@keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } +} +#loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + margin-top: 2px; + box-sizing: content-box; +} +#icon { + position: absolute; +} +#rzp-logo{ + width: auto; + height: 80px !important; +} +@media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } +} + + +.single_add_to_cart_button.button{ + z-index: 2 !important; + } + + .quantity{ + z-index: 2 !important; + } diff --git a/public/css/bootstrap.min.css b/public/css/bootstrap.min.css old mode 100644 new mode 100755 diff --git a/public/css/divi.css b/public/css/divi.css new file mode 100644 index 00000000..c679507b --- /dev/null +++ b/public/css/divi.css @@ -0,0 +1,103 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + } + #btn-1cc-pdp { + position: relative; + top: 12px; + width: 240px; + border-radius: 3px; + overflow: hidden; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + display: inline-block; + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: 2px; */ + box-sizing: content-box; + line-height: 1; + + } + + .body{ + line-height: 1 !important; + } + + + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } + + +.single_add_to_cart_button.button{ + z-index: 2 !important; +} + +.quantity{ + z-index: 2 !important; +} \ No newline at end of file diff --git a/public/css/electro.css b/public/css/electro.css new file mode 100755 index 00000000..fc5bfce2 --- /dev/null +++ b/public/css/electro.css @@ -0,0 +1,109 @@ +#btn-1cc { + display: block !important; + width: 100%; + border-radius: 1.8em; + overflow: hidden; + } + #btn-1cc-mini-cart { + display: inline-flex; + border-radius: 1.8em; + overflow: hidden; + } + #btn-1cc-pdp { + position: relative; + top: 12px; + border-radius: 1.8em; + overflow: hidden; + + } + #off-canvas-cart-summary .woocommerce-mini-cart__buttons.buttons{ + width: 41%; + display: inline-flex !important; + padding: 20px !important; + margin-left: 10%; + } + + .dropdown-menu-mini-cart .woocommerce-mini-cart__buttons.buttons{ + display: inline-flex !important; + } + +.button.wc-forward{ + width: 100% !important; +} + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + margin-top: 2px; + box-sizing: content-box; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } + + +.single_add_to_cart_button.button{ + z-index: 2 !important; +} + +.quantity{ + z-index: 2 !important; +} \ No newline at end of file diff --git a/public/css/electrochild.css b/public/css/electrochild.css new file mode 100644 index 00000000..bdfe3ca5 --- /dev/null +++ b/public/css/electrochild.css @@ -0,0 +1,109 @@ +#btn-1cc { + display: block !important; + width: 100%; + border-radius: 1.8em; + overflow: hidden; +} +#btn-1cc-mini-cart { + display: inline-flex; + border-radius: 1.8em; + overflow: hidden; +} +#btn-1cc-pdp { + position: relative; + top: 12px; + border-radius: 1.8em; + overflow: hidden; + +} +#off-canvas-cart-summary .woocommerce-mini-cart__buttons.buttons{ + width: 41%; + display: inline-flex !important; + padding: 20px !important; + margin-left: 10%; +} + +.dropdown-menu-mini-cart .woocommerce-mini-cart__buttons.buttons{ + display: inline-flex !important; +} + +.button.wc-forward{ + width: 100% !important; +} +#rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; +} +#rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; +} +#rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; +} +#rzp-spinner.show { + visibility: visible; + opacity: 1; +} +@keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } +} +#loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + margin-top: 2px; + box-sizing: content-box; +} +#icon { + position: absolute; +} +#rzp-logo{ + width: auto; + height: 80px !important; +} +@media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } +} + + +.single_add_to_cart_button.button{ +z-index: 2 !important; +} + +.quantity{ +z-index: 2 !important; +} \ No newline at end of file diff --git a/public/css/elessitheme.css b/public/css/elessitheme.css new file mode 100644 index 00000000..ed6a11ef --- /dev/null +++ b/public/css/elessitheme.css @@ -0,0 +1,94 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + border-radius: 5px; + overflow: hidden; + } + #btn-1cc-pdp { + position: relative; + top: 11px; + border-radius: 5px; + overflow: hidden; + } + + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + margin-top: 2px; + box-sizing: content-box; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } + + +.single_add_to_cart_button.button{ + z-index: 2 !important; +} + +.quantity{ + z-index: 2 !important; +} \ No newline at end of file diff --git a/public/css/elessithemechild.css b/public/css/elessithemechild.css new file mode 100644 index 00000000..38d4269a --- /dev/null +++ b/public/css/elessithemechild.css @@ -0,0 +1,94 @@ +#btn-1cc { + display: block !important; + width: 100%; +} +#btn-1cc-mini-cart { + display: block !important; + width: 100%; + border-radius: 5px; + overflow: hidden; +} +#btn-1cc-pdp { + position: relative; + top: 11px; + border-radius: 5px; + overflow: hidden; +} + +#rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; +} +#rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; +} +#rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; +} +#rzp-spinner.show { + visibility: visible; + opacity: 1; +} +@keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } +} +#loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + margin-top: 2px; + box-sizing: content-box; +} +#icon { + position: absolute; +} +#rzp-logo{ + width: auto; + height: 80px !important; +} +@media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } +} + + +.single_add_to_cart_button.button{ +z-index: 2 !important; +} + +.quantity{ +z-index: 2 !important; +} \ No newline at end of file diff --git a/public/css/flatsome.css b/public/css/flatsome.css new file mode 100644 index 00000000..b2d2f127 --- /dev/null +++ b/public/css/flatsome.css @@ -0,0 +1,95 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + + margin-top: 12px; + width: 100%; + } + #btn-1cc-pdp { + position: relative; + top: 10px; + width: 258px; + border-radius: 0; + overflow: hidden; + } + + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + margin-top: 2px; + box-sizing: content-box; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } + + +.single_add_to_cart_button.button{ + z-index: 2 !important; +} + +.quantity{ + z-index: 2 !important; +} \ No newline at end of file diff --git a/public/css/lebe.css b/public/css/lebe.css new file mode 100644 index 00000000..163da1a8 --- /dev/null +++ b/public/css/lebe.css @@ -0,0 +1,97 @@ +#btn-1cc { + display: block !important; +} +#btn-1cc-mini-cart { + display: block !important; + width: 100%; +} +#btn-1cc-pdp { + position: relative; + top: 6px; + width: 268px; +} +#rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; +} +#rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; +} +#rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; +} +#rzp-spinner.show { + visibility: visible; + opacity: 1; +} + +#icon{ + position: fixed; + align-items: center; +} +@keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } +} +#loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; +} +#icon { + position: absolute; +} +#rzp-logo{ + width: auto; + height: 80px !important; +} +@media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } +} + + + + +.single_add_to_cart_button.button{ +z-index: 2 !important; +} + +.quantity{ +z-index: 2 !important; +} \ No newline at end of file diff --git a/public/css/lebe|sharedbywptry.org.css b/public/css/lebe|sharedbywptry.org.css new file mode 100644 index 00000000..accb5608 --- /dev/null +++ b/public/css/lebe|sharedbywptry.org.css @@ -0,0 +1,97 @@ +#btn-1cc { + display: block !important; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + } + #btn-1cc-pdp { + position: relative; + top: 6px; + width: 268px; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } + + + + +.single_add_to_cart_button.button{ + z-index: 2 !important; +} + +.quantity{ + z-index: 2 !important; +} \ No newline at end of file diff --git a/public/css/martfury.css b/public/css/martfury.css new file mode 100644 index 00000000..8b597095 --- /dev/null +++ b/public/css/martfury.css @@ -0,0 +1,102 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: inline-block !important; + width: 150px; + position: relative; + top: 18px; + margin-left: 12px; + border-radius: 3px; + overflow-x: hidden; + } + + .widget_shopping_cart_content .woocommerce-mini-cart__buttons .button{ + min-width: 110px !important; + } + + .widget_shopping_cart_content .woocommerce-mini-cart__buttons{ + display: inline-flex !important; + margin-left: 30px !important; + } + #btn-1cc-pdp { + position: relative; + top: 16px; + width: 332px; + border-radius: 3px; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } \ No newline at end of file diff --git a/public/css/molla.css b/public/css/molla.css new file mode 100644 index 00000000..d52c7cf8 --- /dev/null +++ b/public/css/molla.css @@ -0,0 +1,94 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + margin-top: 6px; + } + + .button.wc-forward{ + min-width: 100% !important; + } + #btn-1cc-pdp { + position: relative; + top:12px; + width: 198px; + border-radius: 0; + overflow: hidden; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } diff --git a/public/css/porto.css b/public/css/porto.css new file mode 100644 index 00000000..4e988faf --- /dev/null +++ b/public/css/porto.css @@ -0,0 +1,103 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + } + #btn-1cc-pdp { + display: block !important; + width: 287px; + position: relative; + top: 8px; + } + + .single-product form.cart:not(.variations_form){ + display: block !important; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + +.view-cart-btn{ + margin-top: 20px; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } + + @media (max-width: 991px){ + #btn-1cc-pdp{ + width: 270px; + } + } + \ No newline at end of file diff --git a/public/css/puca.css b/public/css/puca.css new file mode 100644 index 00000000..13c5a65e --- /dev/null +++ b/public/css/puca.css @@ -0,0 +1,81 @@ +#btn-1cc { + display: block !important; + width: 100%; +} +#btn-1cc-mini-cart { + display: block !important; + width: 100%; +} +#btn-1cc-pdp { + position: relative; + top: 10px; + width: 311px; +} +#rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; +} +#rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; +} +#rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; +} +#rzp-spinner.show { + visibility: visible; + opacity: 1; +} +@keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } +} +#loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + margin-top: 2px; + box-sizing: content-box; +} +#icon { + position: absolute; +} +#rzp-logo{ + width: auto; + height: 80px !important; +} +@media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } +} \ No newline at end of file diff --git a/public/css/razzi.css b/public/css/razzi.css new file mode 100644 index 00000000..89b19dca --- /dev/null +++ b/public/css/razzi.css @@ -0,0 +1,88 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + margin-top: 10px; + } + #btn-1cc-pdp { + position: relative; + top: 10px; + width: 383px; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } \ No newline at end of file diff --git a/public/css/razzi|sharedbywptry.org.css b/public/css/razzi|sharedbywptry.org.css new file mode 100644 index 00000000..89b19dca --- /dev/null +++ b/public/css/razzi|sharedbywptry.org.css @@ -0,0 +1,88 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + margin-top: 10px; + } + #btn-1cc-pdp { + position: relative; + top: 10px; + width: 383px; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } \ No newline at end of file diff --git a/public/css/rehubtheme.css b/public/css/rehubtheme.css new file mode 100644 index 00000000..16c1cb96 --- /dev/null +++ b/public/css/rehubtheme.css @@ -0,0 +1,92 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + } + #btn-1cc-pdp { +position: relative; +top:12px; + width: 256px; + + } + + .woo-btn-inline-area form.cart:not(.variations_form):not(.grouped_form){ + display: block !important; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } \ No newline at end of file diff --git a/public/css/shoptimizer.css b/public/css/shoptimizer.css new file mode 100644 index 00000000..4daeeb46 --- /dev/null +++ b/public/css/shoptimizer.css @@ -0,0 +1,101 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + border-radius: 2px; + overflow: hidden; + } + #btn-1cc-pdp { + width: calc(100% - 4px); + position: relative; + top: 15px; + z-index: 0; + border-radius: 2px; + overflow: hidden; + } + + .quantity.buttons_added{ + z-index: 1; + + } + + .single-product div.product form.cart .button{ + z-index: 1; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } \ No newline at end of file diff --git a/public/css/storefront.css b/public/css/storefront.css new file mode 100644 index 00000000..0eaa23e3 --- /dev/null +++ b/public/css/storefront.css @@ -0,0 +1,91 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + + padding-left: 1.41575em; + padding-right: 1.41575em; + } + #btn-1cc-pdp { + display: block; + position: relative; + top: 10px; + width: 202px; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } \ No newline at end of file diff --git a/public/css/twentynineteen.css b/public/css/twentynineteen.css new file mode 100644 index 00000000..29628808 --- /dev/null +++ b/public/css/twentynineteen.css @@ -0,0 +1,89 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + } + #btn-1cc-pdp { + position: relative; + top: 15px; + width: 267px; + border-radius: 5px; + overflow: hidden; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } \ No newline at end of file diff --git a/public/css/twentytwenty-one.css b/public/css/twentytwenty-one.css new file mode 100644 index 00000000..4e6a115f --- /dev/null +++ b/public/css/twentytwenty-one.css @@ -0,0 +1,87 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + } + #btn-1cc-pdp { + position: relative; + top: 12px; + width: 279px; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } \ No newline at end of file diff --git a/public/css/twentytwenty-two.css b/public/css/twentytwenty-two.css new file mode 100644 index 00000000..0a080ab5 --- /dev/null +++ b/public/css/twentytwenty-two.css @@ -0,0 +1,104 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + } + #btn-1cc-pdp { + position: relative; + top: -18px; + width: 190px; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + + #btn-1cc-pdp { + position: relative; + bottom: 10px; + width: 190px; + padding-bottom: 10px; + } + + + } + + + @media (max-width: 991px){ + #btn-1cc-pdp{ + position: relative; + top: -16px; + } + } \ No newline at end of file diff --git a/public/css/twentytwenty.css b/public/css/twentytwenty.css new file mode 100644 index 00000000..9cb3054d --- /dev/null +++ b/public/css/twentytwenty.css @@ -0,0 +1,92 @@ + + + + + +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + } + #btn-1cc-pdp { + position: relative; + top: 12px; + width: 247px; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } \ No newline at end of file diff --git a/public/css/woo_route.css b/public/css/woo_route.css old mode 100644 new mode 100755 diff --git a/public/css/woodmart.css b/public/css/woodmart.css new file mode 100644 index 00000000..b1ba1b4c --- /dev/null +++ b/public/css/woodmart.css @@ -0,0 +1,94 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + + padding-right: 15px; + padding-left: 15px; + margin-top: 12px; + } + #btn-1cc-pdp { + position: relative; + top: -1px; + width: 221px; + + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } + + \ No newline at end of file diff --git a/public/css/woostify.css b/public/css/woostify.css new file mode 100644 index 00000000..bee152f4 --- /dev/null +++ b/public/css/woostify.css @@ -0,0 +1,89 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + } + #btn-1cc-pdp { + width: 380px; + position: relative; + top: 12px; + border-radius: 50px; + overflow: hidden; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } \ No newline at end of file diff --git a/public/css/woovina.css b/public/css/woovina.css new file mode 100644 index 00000000..edb0dd08 --- /dev/null +++ b/public/css/woovina.css @@ -0,0 +1,89 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + display: block !important; + width: 100%; + } + #btn-1cc-pdp { + position: relative; + top:12px; + width: 291px; + border-radius: 22px; + overflow: hidden; + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } \ No newline at end of file diff --git a/public/css/zoa.css b/public/css/zoa.css new file mode 100644 index 00000000..e6208ca6 --- /dev/null +++ b/public/css/zoa.css @@ -0,0 +1,100 @@ +#btn-1cc { + display: block !important; + width: 100%; + } + #btn-1cc-mini-cart { + position: absolute; + bottom: 0px; + right: 0px; + width: 148px; + height: 41px; + } + #btn-1cc-pdp { + position: relative; + top: 15px; + width: 524px; + + } + + + @media (max-width: 1500px){ + #btn-1cc-pdp { + position: relative; + top: 15px; + width: 312px; + } + } + #rzp-spinner-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + background: rgba(0, 0, 0); + visibility: hidden; + opacity: 0; + } + #rzp-spinner-backdrop.show { + visibility: visible; + opacity: 0.4; + } + #rzp-spinner { + visibility: hidden; + opacity: 0; + /* positioning and centering */ + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + z-index: 10000; + display: flex !important; + align-items: center; + justify-content: center; + } + #rzp-spinner.show { + visibility: visible; + opacity: 1; + } + + #icon{ + position: fixed; + align-items: center; + } + @keyframes rotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + #loading-indicator { + border-radius: 50%; + width: 80px; + height: 80px; + border: 4px solid; + border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important; + animation: 1s linear 0s infinite normal none running rotate; + /* margin-top: -6px; */ + box-sizing: content-box; + line-height: 14px; + } + #icon { + position: absolute; + } + #rzp-logo{ + width: auto; + height: 80px !important; + } + @media (max-device-height: 768px), (max-device-width: 768px) { + #loading-indicator { + width: 45px; + height: 45px; + } + #rzp-logo { + height: 45px !important; + } + } \ No newline at end of file diff --git a/templates/rzp-cart-checkout-btn.php b/templates/rzp-cart-checkout-btn.php index 56cfac4c..8cd28701 100644 --- a/templates/rzp-cart-checkout-btn.php +++ b/templates/rzp-cart-checkout-btn.php @@ -3,11 +3,10 @@ display: none !important; } -
- + +
+ +
+ +
diff --git a/templates/rzp-dual-checkout-btn.php b/templates/rzp-dual-checkout-btn.php new file mode 100644 index 00000000..0bc24518 --- /dev/null +++ b/templates/rzp-dual-checkout-btn.php @@ -0,0 +1,7 @@ + +
+ +
+ +
+
diff --git a/templates/rzp-mini-checkout-btn.php b/templates/rzp-mini-checkout-btn.php index f563c402..a407b3e4 100644 --- a/templates/rzp-mini-checkout-btn.php +++ b/templates/rzp-mini-checkout-btn.php @@ -1,10 +1,12 @@ -
- +
+ >
-
+
+
+
+
+ +
+
+
\ No newline at end of file diff --git a/templates/rzp-pdp-checkout-btn.php b/templates/rzp-pdp-checkout-btn.php index 035ffebc..6dab8653 100644 --- a/templates/rzp-pdp-checkout-btn.php +++ b/templates/rzp-pdp-checkout-btn.php @@ -2,15 +2,14 @@ global $product; $productData = wp_json_encode(['id' => $product->get_id(), 'quantity' => 1]); ?> - + pdp_checkout="" > + +
+ +
+
+ \ No newline at end of file diff --git a/woo-razorpay.php b/woo-razorpay.php index 3d5f4213..69401a6d 100644 --- a/woo-razorpay.php +++ b/woo-razorpay.php @@ -27,6 +27,7 @@ require_once __DIR__.'/includes/support/cartbounty.php'; require_once __DIR__.'/includes/support/wati.php'; require_once __DIR__.'/includes/razorpay-affordability-widget.php'; +require_once __DIR__.'/includes/stylehandler.php'; use Razorpay\Api\Api; use Razorpay\Api\Errors; @@ -173,6 +174,7 @@ public function __construct($hooks = true) // 1cc flags should be enabled only if merchant has access to 1cc feature $is1ccAvailable = false; $isAccCreationAvailable = false; + $isDualCheckoutEnabled = false; // Load preference API call only for administrative interface page. if (is_admin()) @@ -192,6 +194,11 @@ public function __construct($hooks = true) $isAccCreationAvailable = true; } + if (!empty($merchantPreferences['features']['one_cc_dual_checkout'])) { + $isDualCheckoutEnabled = true; + } + + } catch (\Exception $e) { rzpLogError($e->getMessage()); } @@ -219,6 +226,14 @@ public function __construct($hooks = true) )); } + if ($isDualCheckoutEnabled) { + $this->visibleSettings = array_merge($this->visibleSettings, array( + 'enable_dual_checkout_oncart', + 'enable_dual_checkout_onpdp', + 'enable_dual_checkout_minicart', + )); + } + } $this->init_form_fields(); @@ -2536,7 +2551,9 @@ function enqueueScriptsFor1cc() wp_register_script('1cc_razorpay_checkout', RZP_CHECKOUTJS_URL, null, null); wp_enqueue_script('1cc_razorpay_checkout'); - wp_register_style(RZP_1CC_CSS_SCRIPT, plugin_dir_url(__FILE__) . 'public/css/1cc-product-checkout.css', null, null); + + $themeInfo=styleHandler(wp_get_theme()->name); + wp_register_style(RZP_1CC_CSS_SCRIPT,$themeInfo, null, null); wp_enqueue_style(RZP_1CC_CSS_SCRIPT); wp_register_script('btn_1cc_checkout', plugin_dir_url(__FILE__) . 'btn-1cc-checkout.js', null, null); @@ -2563,14 +2580,18 @@ function addCheckoutButton() if (isRazorpayPluginEnabled() && is1ccEnabled() ) { + if (isDualCartCheckoutEnabled()){ + $tempTest = RZP_PATH . 'templates/rzp-dual-checkout-btn.php'; + } else { + $tempTest = RZP_PATH . 'templates/rzp-cart-checkout-btn.php'; + } + if (isTestModeEnabled()) { $current_user = wp_get_current_user(); if ($current_user->has_cap( 'administrator' ) || preg_match( '/@razorpay.com$/i', $current_user->user_email )) { - $tempTest = RZP_PATH . 'templates/rzp-cart-checkout-btn.php'; load_template( $tempTest, false, array() ); } } else { - $tempTest = RZP_PATH . 'templates/rzp-cart-checkout-btn.php'; load_template( $tempTest, false, array() ); } } @@ -2587,8 +2608,10 @@ function addCheckoutButton() add_action( 'woocommerce_widget_shopping_cart_buttons', function() { // Removing Buttons - remove_action( 'woocommerce_widget_shopping_cart_buttons', 'woocommerce_widget_shopping_cart_proceed_to_checkout', 20 ); - + if(isDualMiniCartCheckoutEnabled() === false){ + // Removing Buttons + remove_action( 'woocommerce_widget_shopping_cart_buttons', 'woocommerce_widget_shopping_cart_proceed_to_checkout', 20 ); + } add_action('woocommerce_cart_updated', 'enqueueScriptsFor1cc', 10); add_action( 'woocommerce_widget_shopping_cart_buttons', 'addMiniCheckoutButton', 20 );