Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
rang-rang-coffee
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quan Nguyen
rang-rang-coffee
Commits
a1632971
Commit
a1632971
authored
Oct 22, 2021
by
Quan Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 22/10 1504
parent
b369457a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
108 deletions
+33
-108
custom.css
wp-content/themes/rangrangcoffee/assets/css/custom.css
+4
-0
every3week.svg
...ent/themes/rangrangcoffee/assets/img/weeks/every3week.svg
+7
-10
every4week.svg
...ent/themes/rangrangcoffee/assets/img/weeks/every4week.svg
+5
-8
everyotherweek.svg
...themes/rangrangcoffee/assets/img/weeks/everyotherweek.svg
+5
-8
everyweek.svg
...tent/themes/rangrangcoffee/assets/img/weeks/everyweek.svg
+7
-10
coffee-sub.js
wp-content/themes/rangrangcoffee/assets/js/coffee-sub.js
+1
-70
product.js
wp-content/themes/rangrangcoffee/assets/js/product.js
+3
-2
content-single-product.php
...mes/rangrangcoffee/woocommerce/content-single-product.php
+1
-0
No files found.
wp-content/themes/rangrangcoffee/assets/css/custom.css
View file @
a1632971
...
...
@@ -609,4 +609,7 @@ html #wpadminbar.toggle-bar{
/* hide stock in product */
.woocommerce
div
.product
p
.stock
{
display
:
none
!important
;
}
.woocommerce
div
.product
form
.cart
{
margin-bottom
:
0
;
}
\ No newline at end of file
wp-content/themes/rangrangcoffee/assets/img/weeks/every3week.svg
View file @
a1632971
<svg
width=
"102"
height=
"92"
viewBox=
"0 0 102 92"
xmlns=
"http://www.w3.org/2000/svg"
class=
"h5 h6-ns"
>
<title>
Calender Illustration - Every 3 Weeks
</title>
<g
fill=
"none"
fill-rule=
"evenodd"
>
<path
d=
"M1 1h100v90H1V1zm0 90h100V14H1v77z"
stroke=
"#777"
stroke-width=
"2"
fill=
"#777"
></path>
<path
fill=
"#01A1DD"
d=
"M14 30h12.7v5.8H14z"
></path>
<path
fill=
"#BABABA"
d=
"M14 57h12.7v5.8H14zM14 44h12.7v5.8H14zM35 30h12.7v5.8H35zM35 57h12.7v5.8H35zM35 44h12.7v5.8H35zM55 30h12.7v5.8H55zM55 57h12.7v5.8H55zM55 44h12.7v5.8H55zM75 30h12.7v5.8H75zM75 57h12.7v5.8H75z"
></path>
<path
fill=
"#01A1DD"
d=
"M14 70h12.7v5.8H14z"
></path>
<path
fill=
"#BABABA"
d=
"M35 70h12.7v5.8H35zM55 70h12.7v5.8H55zM75 70h12.7v5.8H75zM75 44h12.7v5.8H75z"
></path>
</g>
<svg
width=
"102"
height=
"92"
viewBox=
"0 0 102 92"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M14 30H26.7V35.8H14V30Z"
fill=
"#9DEC25"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M14 57H26.7V62.8H14V57ZM14 44H26.7V49.8H14V44ZM35 30H47.7V35.8H35V30ZM35 57H47.7V62.8H35V57ZM35 44H47.7V49.8H35V44ZM55 30H67.7V35.8H55V30ZM55 57H67.7V62.8H55V57ZM55 44H67.7V49.8H55V44ZM75 30H87.7V35.8H75V30ZM75 57H87.7V62.8H75V57Z"
fill=
"#BABABA"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M14 70H26.7V75.8H14V70Z"
fill=
"#9DEC25"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M35 70H47.7V75.8H35V70ZM55 70H67.7V75.8H55V70ZM75 70H87.7V75.8H75V70ZM75 44H87.7V49.8H75V44Z"
fill=
"#BABABA"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M1 1H101V91H1V1ZM1 91H101V14H1V91Z"
fill=
"#444444"
/>
<path
d=
"M101 91V1H1V91M101 91H1M101 91V14H1V91"
stroke=
"#444444"
stroke-width=
"2"
/>
</svg>
wp-content/themes/rangrangcoffee/assets/img/weeks/every4week.svg
View file @
a1632971
<svg
width=
"102"
height=
"92"
viewBox=
"0 0 102 92"
xmlns=
"http://www.w3.org/2000/svg"
class=
"h5 h6-ns"
>
<title>
Calender Illustration - Every 4 Weeks
</title>
<g
fill=
"none"
fill-rule=
"evenodd"
>
<path
d=
"M1 1h100v90H1V1zm0 90h100V14H1v77z"
stroke=
"#777"
stroke-width=
"2"
fill=
"#777"
></path>
<path
fill=
"#01A1DD"
d=
"M14 30h12.7v5.8H14z"
></path>
<path
fill=
"#BABABA"
d=
"M14 57h12.7v5.8H14zM14 44h12.7v5.8H14zM35 30h12.7v5.8H35zM35 57h12.7v5.8H35zM35 44h12.7v5.8H35zM55 30h12.7v5.8H55zM55 57h12.7v5.8H55zM55 44h12.7v5.8H55zM75 30h12.7v5.8H75zM75 57h12.7v5.8H75zM14 70h12.7v5.8H14zM35 70h12.7v5.8H35zM55 70h12.7v5.8H55zM75 70h12.7v5.8H75zM75 44h12.7v5.8H75z"
></path>
</g>
<svg
width=
"102"
height=
"92"
viewBox=
"0 0 102 92"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M1 1H101V91H1V1ZM1 91H101V14H1V91Z"
fill=
"#444444"
/>
<path
d=
"M101 91V1H1V91M101 91H1M101 91V14H1V91"
stroke=
"#444444"
stroke-width=
"2"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M14 30H26.7V35.8H14V30Z"
fill=
"#9DEC25"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M14 57H26.7V62.8H14V57ZM14 44H26.7V49.8H14V44ZM35 30H47.7V35.8H35V30ZM35 57H47.7V62.8H35V57ZM35 44H47.7V49.8H35V44ZM55 30H67.7V35.8H55V30ZM55 57H67.7V62.8H55V57ZM55 44H67.7V49.8H55V44ZM75 30H87.7V35.8H75V30ZM75 57H87.7V62.8H75V57ZM14 70H26.7V75.8H14V70ZM35 70H47.7V75.8H35V70ZM55 70H67.7V75.8H55V70ZM75 70H87.7V75.8H75V70ZM75 44H87.7V49.8H75V44Z"
fill=
"#BABABA"
/>
</svg>
wp-content/themes/rangrangcoffee/assets/img/weeks/everyotherweek.svg
View file @
a1632971
<svg
width=
"102"
height=
"92"
viewBox=
"0 0 102 92"
xmlns=
"http://www.w3.org/2000/svg"
class=
"h5 h6-ns"
>
<title>
Calender Illustration - Every 2 Weeks
</title>
<g
fill=
"none"
fill-rule=
"evenodd"
>
<path
d=
"M1 1h100v90H1V1zm0 90h100V14H1v77z"
stroke=
"#777"
stroke-width=
"2"
fill=
"#777"
></path>
<path
fill=
"#01A1DD"
d=
"M14 30h12.7v5.8H14zM14 57h12.7v5.8H14z"
></path>
<path
fill=
"#BABABA"
d=
"M14 44h12.7v5.8H14zM35 30h12.7v5.8H35zM35 57h12.7v5.8H35zM35 44h12.7v5.8H35zM55 30h12.7v5.8H55zM55 57h12.7v5.8H55zM55 44h12.7v5.8H55zM75 30h12.7v5.8H75zM75 57h12.7v5.8H75zM14 70h12.7v5.8H14zM35 70h12.7v5.8H35zM55 70h12.7v5.8H55zM75 70h12.7v5.8H75zM75 44h12.7v5.8H75z"
></path>
</g>
<svg
width=
"102"
height=
"92"
viewBox=
"0 0 102 92"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M1 1H101V91H1V1ZM1 91H101V14H1V91Z"
fill=
"#444444"
/>
<path
d=
"M101 91V1H1V91M101 91H1M101 91V14H1V91"
stroke=
"#444444"
stroke-width=
"2"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M14 44H26.7V49.8H14V44ZM35 30H47.7V35.8H35V30ZM35 57H47.7V62.8H35V57ZM35 44H47.7V49.8H35V44ZM55 30H67.7V35.8H55V30ZM55 57H67.7V62.8H55V57ZM55 44H67.7V49.8H55V44ZM75 30H87.7V35.8H75V30ZM75 57H87.7V62.8H75V57ZM14 70H26.7V75.8H14V70ZM35 70H47.7V75.8H35V70ZM55 70H67.7V75.8H55V70ZM75 70H87.7V75.8H75V70ZM75 44H87.7V49.8H75V44Z"
fill=
"#BABABA"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M14 30H26.7V35.8H14V30ZM14 57H26.7V62.8H14V57Z"
fill=
"#9DEC25"
/>
</svg>
wp-content/themes/rangrangcoffee/assets/img/weeks/everyweek.svg
View file @
a1632971
<svg
width=
"102"
height=
"92"
viewBox=
"0 0 102 92"
xmlns=
"http://www.w3.org/2000/svg"
class=
"h5 h6-ns"
>
<title>
Calender Illustration - Every Week
</title>
<g
fill=
"none"
fill-rule=
"evenodd"
>
<path
d=
"M1 1h100v90H1V1zm0 90h100V14H1v77z"
stroke=
"#777"
stroke-width=
"2"
fill=
"#777"
></path>
<path
fill=
"#01A1DD"
d=
"M14 30h12.7v5.8H14zM14 57h12.7v5.8H14zM14 44h12.7v5.8H14z"
></path>
<path
fill=
"#BABABA"
d=
"M35 30h12.7v5.8H35zM35 57h12.7v5.8H35zM35 44h12.7v5.8H35zM55 30h12.7v5.8H55zM55 57h12.7v5.8H55zM55 44h12.7v5.8H55zM75 30h12.7v5.8H75zM75 57h12.7v5.8H75z"
></path>
<path
fill=
"#01A1DD"
d=
"M14 70h12.7v5.8H14z"
></path>
<path
fill=
"#BABABA"
d=
"M35 70h12.7v5.8H35zM55 70h12.7v5.8H55zM75 70h12.7v5.8H75zM75 44h12.7v5.8H75z"
></path>
</g>
<svg
width=
"102"
height=
"92"
viewBox=
"0 0 102 92"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M1 1H101V91H1V1ZM1 91H101V14H1V91Z"
fill=
"#444444"
/>
<path
d=
"M101 91V1H1V91M101 91H1M101 91V14H1V91"
stroke=
"#444444"
stroke-width=
"2"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M14 30H26.7V35.8H14V30ZM14 57H26.7V62.8H14V57ZM14 44H26.7V49.8H14V44Z"
fill=
"#9DEC25"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M35 30H47.7V35.8H35V30ZM35 57H47.7V62.8H35V57ZM35 44H47.7V49.8H35V44ZM55 30H67.7V35.8H55V30ZM55 57H67.7V62.8H55V57ZM55 44H67.7V49.8H55V44ZM75 30H87.7V35.8H75V30ZM75 57H87.7V62.8H75V57Z"
fill=
"#BABABA"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M14 70H26.7V75.8H14V70Z"
fill=
"#9DEC25"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M35 70H47.7V75.8H35V70ZM55 70H67.7V75.8H55V70ZM75 70H87.7V75.8H75V70ZM75 44H87.7V49.8H75V44Z"
fill=
"#BABABA"
/>
</svg>
wp-content/themes/rangrangcoffee/assets/js/coffee-sub.js
View file @
a1632971
$
(
document
).
ready
(
function
()
{
// Add border to selected item
const
subsSelectSection
=
$
(
'.subs__select-section'
);
subsSelectSection
.
each
(
function
()
{
const
items
=
$
(
this
).
find
(
'.subs__item-container'
)
items
.
click
(
function
()
{
items
.
each
(
function
()
{
$
(
this
).
removeClass
(
'subs__item-container--selected'
);
});
$
(
this
).
addClass
(
'subs__item-container--selected'
);
});
});
// input
const
inputAttributePaBag
=
$
(
'input[name="attribute_pa_bag"]'
);
const
inputVariationId
=
$
(
'input[name="variation_id"]'
);
const
inputFrequency
=
$
(
'input[name="frequency"]'
);
const
inputNumOfBag
=
$
(
'input[name="num_of_bag"]'
);
const
totalPrice
=
$
(
'#totalPrice'
);
const
btnContinue
=
$
(
'#btnContinue'
);
const
totalSection
=
$
(
'#total'
);
const
formCheckOut
=
$
(
'form.js-form-checkout'
).
first
();
const
summaryBag
=
$
(
'#summaryBag'
);
const
summaryBagTitle
=
summaryBag
.
find
(
'.subs__text--primary'
);
const
summaryBagDesc
=
summaryBag
.
find
(
'.subs__text--secondary'
);
const
summaryFreq
=
$
(
'#summaryFreq'
);
const
summaryFreqTitle
=
summaryFreq
.
find
(
'.js-freq'
);
const
selectBag
=
$
(
'#selectBag'
);
const
bags
=
selectBag
.
find
(
'.subs__item-container'
);
const
selectFrequency
=
$
(
'#selectFrequency'
);
const
frequencies
=
selectFrequency
.
find
(
'.subs__item-container'
);
btnContinue
.
click
(
function
()
{
selectBag
.
addClass
(
'd-none'
);
selectFrequency
.
removeClass
(
'd-none'
);
$
(
this
).
addClass
(
'd-none'
);
});
bags
.
click
(
function
()
{
const
title
=
$
(
this
).
find
(
'.subs__text--primary'
).
text
().
trim
();
const
desc
=
$
(
this
).
find
(
'.subs__text--secondary'
).
text
().
trim
();
const
price
=
$
(
this
).
data
(
'price'
);
summaryBagTitle
.
text
(
title
);
summaryBagDesc
.
text
(
desc
);
totalPrice
.
text
(
price
);
summaryBag
.
removeClass
(
'd-none'
);
btnContinue
.
removeClass
(
'd-none'
);
totalSection
.
removeClass
(
'd-none'
);
inputAttributePaBag
.
val
(
$
(
this
).
data
(
'slug'
));
inputVariationId
.
val
(
$
(
this
).
data
(
'id'
));
inputNumOfBag
.
val
(
$
(
this
).
data
(
'num-of-bag'
));
});
frequencies
.
click
(
function
()
{
const
title
=
$
(
this
).
find
(
'.subs__text--primary'
).
text
().
trim
().
toLowerCase
();
summaryFreqTitle
.
text
(
title
);
summaryFreq
.
removeClass
(
'd-none'
);
formCheckOut
.
removeClass
(
'd-none'
);
inputFrequency
.
val
(
$
(
this
).
data
(
'value'
));
});
});
$
(
document
).
ready
(
function
(){
$
(
".subs__select-section"
).
each
(
function
(){
const
t
=
$
(
this
).
find
(
".subs__item-container"
);
t
.
click
(
function
(){
t
.
each
(
function
(){
$
(
this
).
removeClass
(
"subs__item-container--selected"
)}),
$
(
this
).
addClass
(
"subs__item-container--selected"
)})});
const
t
=
$
(
'input[name="attribute_pa_bag"]'
),
e
=
$
(
'input[name="variation_id"]'
),
n
=
$
(
'input[name="frequency"]'
),
s
=
$
(
'input[name="num_of_bag"]'
),
i
=
$
(
"#totalPrice"
),
a
=
$
(
"#btnContinue"
),
o
=
$
(
"#total"
),
c
=
$
(
"form.js-form-checkout"
).
first
(),
r
=
$
(
"#summaryBag"
),
d
=
r
.
find
(
".subs__text--primary"
),
u
=
r
.
find
(
".subs__text--secondary"
),
m
=
$
(
"#summaryFreq"
),
l
=
m
.
find
(
".js-freq"
),
_
=
$
(
"#selectBag"
),
f
=
_
.
find
(
".subs__item-container"
),
b
=
$
(
"#selectFrequency"
),
h
=
b
.
find
(
".subs__item-container"
);
a
.
click
(
function
(){
_
.
addClass
(
"d-none"
),
b
.
removeClass
(
"d-none"
),
$
(
this
).
addClass
(
"d-none"
)}),
f
.
click
(
function
(){
const
n
=
$
(
this
).
find
(
".subs__text--primary"
).
text
().
trim
(),
c
=
$
(
this
).
find
(
".subs__text--secondary"
).
text
().
trim
(),
m
=
$
(
this
).
data
(
"price"
);
d
.
text
(
n
),
u
.
text
(
c
),
i
.
text
(
m
),
r
.
removeClass
(
"d-none"
),
a
.
removeClass
(
"d-none"
),
o
.
removeClass
(
"d-none"
),
t
.
val
(
$
(
this
).
data
(
"slug"
)),
e
.
val
(
$
(
this
).
data
(
"id"
)),
s
.
val
(
$
(
this
).
data
(
"num-of-bag"
))}),
h
.
click
(
function
(){
const
t
=
$
(
this
).
find
(
".subs__text--primary"
).
text
().
trim
().
toLowerCase
();
l
.
text
(
t
),
m
.
removeClass
(
"d-none"
),
c
.
removeClass
(
"d-none"
),
n
.
val
(
$
(
this
).
data
(
"value"
))})});
wp-content/themes/rangrangcoffee/assets/js/product.js
View file @
a1632971
...
...
@@ -67,7 +67,7 @@ function productLocation(branchIDParams) {
$
(
".product-detail.product-type-simple .location-detail .message"
).
text
(
""
);
$
(
".product-detail.product-type-simple .location-detail .branch"
).
text
(
""
);
}
else
{
// Product in stock
$
(
".product.product-detail .product-detail__notification"
).
hide
();
if
(
qualityStockText
!==
null
)
{
...
...
@@ -100,13 +100,14 @@ function productLocation(branchIDParams) {
".product-detail.product-type-simple .product-detail__notification-delivery"
).
addClass
(
"d-none"
);
}
else
{
// Product out of stock
$
(
".product-detail.product-type-simple .location-detail .message"
).
text
(
""
);
$
(
".product-detail.product-type-simple .location-detail .branch"
).
text
(
""
);
$
(
".product-detail.product-type-simple .stock
.in-stock
"
).
text
(
$
(
".product-detail.product-type-simple .stock
-notification
"
).
text
(
$
(
".modal-visible .product_at"
).
text
()
+
" "
+
detailAddress
+
...
...
wp-content/themes/rangrangcoffee/woocommerce/content-single-product.php
View file @
a1632971
...
...
@@ -197,6 +197,7 @@ $product_id = $product->get_id();
*/
do_action
(
'woocommerce_single_product_summary'
);
?>
<p
class=
"stock-notification text-error"
></p>
<div
class=
"product-detail__notification-delivery d-none"
>
<span>
<?php
pll_e
(
'Please change'
)
?>
</span>
<span
class=
"text-underline"
data-toggle=
"modal"
data-target=
"#modalLocation"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment