Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Replace basket icon with cart
weronka60bcc5b87711
diff --git a/saleor/static/img/basket.svg b/saleor/static/img/basket.svgdeleted file mode 100644index 42fc46a117..0000000000--- a/saleor/static/img/basket.svg+++ /dev/null@@ -1,12 +0,0 @@-<svg width="35" height="30" viewBox="0 0 35 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:figma="http://www.figma.com/figma/ns">-<title></title>-<desc>Created using Figma</desc>-<g id="Canvas" transform="translate(473 1328)" figma:type="canvas">-<g id="" style="mix-blend-mode:normal;" figma:type="text">-<use xlink:href="#path0_fill" transform="translate(-473 -1328)" fill="#333333" style="mix-blend-mode:normal;"/>-</g>-</g>-<defs>-<path id="path0_fill" d="M 32.1429 12.8571C 32.7344 12.8571 33.2366 13.0692 33.6496 13.4933C 34.0737 13.9062 34.2857 14.4085 34.2857 15C 34.2857 15.5915 34.0737 16.0993 33.6496 16.5234C 33.2366 16.9364 32.7344 17.1429 32.1429 17.1429L 31.8917 17.1429L 29.9665 28.2254C 29.8772 28.7388 29.6317 29.1629 29.2299 29.4978C 28.8281 29.8326 28.3705 30 27.8571 30L 6.42857 30C 5.91518 30 5.45759 29.8326 5.0558 29.4978C 4.65402 29.1629 4.40848 28.7388 4.3192 28.2254L 2.39397 17.1429L 2.14286 17.1429C 1.55134 17.1429 1.04353 16.9364 0.61942 16.5234C 0.206473 16.0993 0 15.5915 0 15C 0 14.4085 0.206473 13.9062 0.61942 13.4933C 1.04353 13.0692 1.55134 12.8571 2.14286 12.8571L 32.1429 12.8571ZM 8.11942 26.25C 8.4096 26.2277 8.64955 26.0993 8.83929 25.865C 9.04018 25.6417 9.12946 25.385 9.10714 25.0949L 8.57143 18.1306C 8.54911 17.8404 8.42076 17.6004 8.18638 17.4107C 7.96317 17.2098 7.70647 17.1205 7.41629 17.1429C 7.12612 17.1652 6.88058 17.2935 6.67969 17.5279C 6.48996 17.7511 6.40625 18.0078 6.42857 18.298L 6.96429 25.2623C 6.98661 25.5413 7.09821 25.7757 7.29911 25.9654C 7.51116 26.1551 7.7567 26.25 8.03571 26.25L 8.11942 26.25ZM 15 25.1786L 15 18.2143C 15 17.9241 14.894 17.673 14.6819 17.4609C 14.4699 17.2489 14.2188 17.1429 13.9286 17.1429C 13.6384 17.1429 13.3873 17.2489 13.1752 17.4609C 12.9632 17.673 12.8571 17.9241 12.8571 18.2143L 12.8571 25.1786C 12.8571 25.4687 12.9632 25.7199 13.1752 25.9319C 13.3873 26.144 13.6384 26.25 13.9286 26.25C 14.2188 26.25 14.4699 26.144 14.6819 25.9319C 14.894 25.7199 15 25.4687 15 25.1786ZM 21.4286 25.1786L 21.4286 18.2143C 21.4286 17.9241 21.3225 17.673 21.1105 17.4609C 20.8984 17.2489 20.6473 17.1429 20.3571 17.1429C 20.067 17.1429 19.8158 17.2489 19.6038 17.4609C 19.3917 17.673 19.2857 17.9241 19.2857 18.2143L 19.2857 25.1786C 19.2857 25.4687 19.3917 25.7199 19.6038 25.9319C 19.8158 26.144 20.067 26.25 20.3571 26.25C 20.6473 26.25 20.8984 26.144 21.1105 25.9319C 21.3225 25.7199 21.4286 25.4687 21.4286 25.1786ZM 27.3214 25.2623L 27.8571 18.298C 27.8795 18.0078 27.7902 17.7511 27.5893 17.5279C 27.3996 17.2935 27.1596 17.1652 26.8694 17.1429C 26.5792 17.1205 26.317 17.2098 26.0826 17.4107C 25.8594 17.6004 25.7366 17.8404 25.7143 18.1306L 25.1786 25.0949C 25.1563 25.385 25.24 25.6417 25.4297 25.865C 25.6306 26.0993 25.8761 26.2277 26.1663 26.25L 26.25 26.25C 26.529 26.25 26.769 26.1551 26.9699 25.9654C 27.1819 25.7757 27.2991 25.5413 27.3214 25.2623ZM 7.96875 4.88839L 6.41183 11.7857L 4.20201 11.7857L 5.89286 4.4029C 6.10491 3.42076 6.60156 2.62277 7.38281 2.00893C 8.16406 1.38393 9.05692 1.07143 10.0614 1.07143L 12.8571 1.07143C 12.8571 0.78125 12.9632 0.530134 13.1752 0.31808C 13.3873 0.106027 13.6384 -1.07288e-06 13.9286 -1.07288e-06L 20.3571 -1.07288e-06C 20.6473 -1.07288e-06 20.8984 0.106027 21.1105 0.31808C 21.3225 0.530134 21.4286 0.78125 21.4286 1.07143L 24.2243 1.07143C 25.2288 1.07143 26.1217 1.38393 26.9029 2.00893C 27.6842 2.62277 28.1808 3.42076 28.3929 4.4029L 30.0837 11.7857L 27.8739 11.7857L 26.317 4.88839C 26.1942 4.39732 25.9375 3.99554 25.5469 3.68303C 25.1674 3.37053 24.7266 3.21428 24.2243 3.21428L 21.4286 3.21428C 21.4286 3.50446 21.3225 3.75558 21.1105 3.96763C 20.8984 4.17969 20.6473 4.28571 20.3571 4.28571L 13.9286 4.28571C 13.6384 4.28571 13.3873 4.17969 13.1752 3.96763C 12.9632 3.75558 12.8571 3.50446 12.8571 3.21428L 10.0614 3.21428C 9.55915 3.21428 9.11272 3.37053 8.7221 3.68303C 8.34263 3.99554 8.09152 4.39732 7.96875 4.88839Z"/>-</defs>-</svg>diff --git a/saleor/static/img/cart.svg b/saleor/static/img/cart.svgnew file mode 100644index 0000000000..1e996cc876--- /dev/null+++ b/saleor/static/img/cart.svg@@ -0,0 +1,58 @@+<svg width="35" height="30" viewBox="0 0 35 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:figma="http://www.figma.com/figma/ns">+<title>icon_cart_02</title>+<desc>Created using Figma</desc>+<g id="Canvas" transform="translate(-2038 1328)" figma:type="canvas">+<g id="icon_cart_02" style="mix-blend-mode:normal;" figma:type="frame">+<g id="Group" style="mix-blend-mode:normal;" figma:type="frame">+<g id="Vector" style="mix-blend-mode:normal;" figma:type="vector">+<use xlink:href="#path0_fill" transform="translate(2045.84 -1313.83)" fill="#333333" style="mix-blend-mode:normal;"/>+</g>+</g>+<g id="Group" style="mix-blend-mode:normal;" figma:type="frame">+<g id="Vector" style="mix-blend-mode:normal;" figma:type="vector">+<use xlink:href="#path1_fill" transform="translate(2044.28 -1323.32)" fill="#333333" style="mix-blend-mode:normal;"/>+</g>+</g>+<g id="Group" style="mix-blend-mode:normal;" figma:type="frame">+<g id="Vector" style="mix-blend-mode:normal;" figma:type="vector">+<use xlink:href="#path2_fill" transform="translate(2046.1 -1303.38)" fill="#333333" style="mix-blend-mode:normal;"/>+</g>+</g>+<g id="Group" style="mix-blend-mode:normal;" figma:type="frame">+<g id="Vector" style="mix-blend-mode:normal;" figma:type="vector">+<use xlink:href="#path3_fill" transform="translate(2063.27 -1303.38)" fill="#333333" style="mix-blend-mode:normal;"/>+</g>+</g>+<g id="Group" style="mix-blend-mode:normal;" figma:type="frame">+<g id="Vector" style="mix-blend-mode:normal;" figma:type="vector">+<use xlink:href="#path4_fill" transform="translate(2038.04 -1328)" fill="#333333" style="mix-blend-mode:normal;"/>+</g>+</g>+<g id="Group" style="mix-blend-mode:normal;" figma:type="frame">+<g id="Vector" style="mix-blend-mode:normal;" figma:type="vector">+<use xlink:href="#path5_fill" transform="translate(2046.29 -1317.67)" fill="#333333" style="mix-blend-mode:normal;"/>+</g>+</g>+<g id="Group" style="mix-blend-mode:normal;" figma:type="frame">+<g id="Vector" style="mix-blend-mode:normal;" figma:type="vector">+<use xlink:href="#path6_fill" transform="translate(2053.47 -1322.8)" fill="#333333" style="mix-blend-mode:normal;"/>+</g>+</g>+<g id="Group" style="mix-blend-mode:normal;" figma:type="frame">+<g id="Vector" style="mix-blend-mode:normal;" figma:type="vector">+<use xlink:href="#path7_fill" transform="translate(2061.1 -1322.8)" fill="#333333" style="mix-blend-mode:normal;"/>+</g>+</g>+</g>+</g>+<defs>+<path id="path0_fill" d="M 21.6798 8.89357L 2.94701 8.89357C 1.51887 8.89357 1.10758e-07 7.85922 1.10758e-07 5.94475C 1.10758e-07 4.08472 1.43358 3.0558 2.82724 2.99955L 22.2187 0.0162459C 22.9773 -0.0998925 23.6868 0.419101 23.7993 1.17582C 23.9154 1.93253 23.3983 2.64206 22.6397 2.76001L 3.16114 5.75784C 3.07222 5.76873 3.04682 5.77598 2.96697 5.77236C 2.90709 5.77961 2.82906 5.80139 2.78551 5.82135C 2.78188 5.8395 2.77643 5.88123 2.77643 5.94475C 2.77643 6.00826 2.78188 6.04818 2.78551 6.06452C 2.83995 6.09718 2.94883 6.11351 2.94883 6.11351L 21.6798 6.11351C 22.4456 6.11351 23.0698 6.73776 23.0698 7.50354C 23.0698 8.26933 22.4437 8.89357 21.6798 8.89357Z"/>+<path id="path1_fill" d="M 4.50916 15.2631C 3.88129 15.2631 3.32237 14.8385 3.1645 14.2143L 0.0432792 1.72574C -0.0637859 1.31019 0.0305764 0.872853 0.295517 0.535326C 0.558643 0.197799 0.961498 2.35361e-07 1.39157 2.35361e-07L 26.365 2.35361e-07C 26.7896 2.35361e-07 27.1943 0.197798 27.4574 0.53351C 27.7205 0.871038 27.8149 1.31019 27.7096 1.72393L 25.3379 11.2128C 25.2036 11.7554 24.7535 12.1637 24.2037 12.249L 4.72329 15.2486C 4.65071 15.2559 4.57812 15.2631 4.50916 15.2631ZM 3.16631 2.77643L 5.54896 12.3107L 22.8645 9.64675L 24.583 2.77643L 3.16631 2.77643Z"/>+<path id="path2_fill" d="M 2.68752 5.37503C 4.17179 5.37503 5.37503 4.17179 5.37503 2.68751C 5.37503 1.20324 4.17179 0 2.68752 0C 1.20324 0 0 1.20324 0 2.68751C 0 4.17179 1.20324 5.37503 2.68752 5.37503Z"/>+<path id="path3_fill" d="M 2.68751 5.37503C 4.17179 5.37503 5.37503 4.17179 5.37503 2.68751C 5.37503 1.20324 4.17179 0 2.68751 0C 1.20324 0 0 1.20324 0 2.68751C 0 4.17179 1.20324 5.37503 2.68751 5.37503Z"/>+<path id="path4_fill" d="M 7.63247 7.45826C 7.05359 7.45826 6.51101 7.08989 6.31684 6.50919L 5.07198 2.77462L 1.39003 2.77462C 0.624244 2.77462 2.76896e-08 2.154 2.76896e-08 1.38822C 2.76896e-08 0.622429 0.624244 -5.88403e-08 1.39003 -5.88403e-08L 6.07186 -5.88403e-08C 6.6707 -5.88403e-08 7.19877 0.382894 7.38749 0.949068L 8.94992 5.6309C 9.19127 6.35858 8.79748 7.14251 8.07162 7.38568C 7.92645 7.43467 7.77764 7.45826 7.63247 7.45826Z"/>+<path id="path5_fill" d="M 23.0698 1.73663L 0.869223 1.73663C 0.390152 1.73663 -3.59964e-07 1.34829 -3.59964e-07 0.869223C -3.59964e-07 0.390152 0.390152 3.46119e-07 0.869223 3.46119e-07L 23.0698 3.46119e-07C 23.5489 3.46119e-07 23.939 0.390152 23.939 0.869223C 23.939 1.34829 23.5489 1.73663 23.0698 1.73663Z"/>+<path id="path6_fill" d="M 0.867408 13.757C 0.388337 13.757 -2.76896e-08 13.3704 -2.76896e-08 12.8914L -2.76896e-08 0.869223C -2.76896e-08 0.388338 0.388337 -3.04585e-07 0.867408 -3.04585e-07C 1.34648 -3.04585e-07 1.73663 0.388338 1.73663 0.869223L 1.73663 12.8914C 1.73482 13.3704 1.34648 13.757 0.867408 13.757Z"/>+<path id="path7_fill" d="M 0.869223 11.5794C 0.390152 11.5794 8.30687e-07 11.1892 8.30687e-07 10.7101L 8.30687e-07 0.869223C 8.30687e-07 0.388338 0.390152 -3.04585e-07 0.869223 -3.04585e-07C 1.34829 -3.04585e-07 1.73845 0.388338 1.73845 0.869223L 1.73845 10.712C 1.73845 11.191 1.34829 11.5794 0.869223 11.5794Z"/>+</defs>+</svg>diff --git a/saleor/static/scss/demo/components/_cart.scss b/saleor/static/scss/demo/components/_cart.scssindex 869283f36c..89a8166ced 100644--- a/saleor/static/scss/demo/components/_cart.scss+++ b/saleor/static/scss/demo/components/_cart.scss@@ -24,7 +24,14 @@color: rgba($body-color, 0.6);}h3 {- display: inline;+ display: inline-block;+ margin-top: $global-margin;+ small {+ color: $gray;+ }+ }+ img {+ vertical-align: top;}}}diff --git a/saleor/static/scss/demo/components/_header.scss b/saleor/static/scss/demo/components/_header.scssindex fe4f8c63b2..663b8c0c42 100644--- a/saleor/static/scss/demo/components/_header.scss+++ b/saleor/static/scss/demo/components/_header.scss@@ -22,7 +22,7 @@}&__brand {padding: $global-padding * 2 0;- &__basket {+ &__cart {@include media-breakpoint-up(md) {margin-top: $global-margin / 2;}diff --git a/saleor/static/scss/demo/variables.scss b/saleor/static/scss/demo/variables.scssindex 85d6520fcf..74d763df79 100644--- a/saleor/static/scss/demo/variables.scss+++ b/saleor/static/scss/demo/variables.scss@@ -1,11 +1,4 @@-// GRID-$container-max-widths: (- sm: 720px,- md: 960px,- lg: 1140px,- xl: 1140px-);-+// GLOBAL$global-padding: 1rem;$global-margin: 1rem;diff --git a/templates/demo/base.html b/templates/demo/base.htmlindex 98b8633ae3..92e5e74f38 100644--- a/templates/demo/base.html+++ b/templates/demo/base.html@@ -51,10 +51,10 @@</a><div class="float-xs-right"><img class="hidden-md-up " src="{% static "img/search-icon.svg" %}">- <div class="navbar__brand__basket float-xs-right">+ <div class="navbar__brand__cart float-xs-right"><a href="{% url "cart:index" %}">- <span class="hidden-sm-down">{% trans "Your basket" %}</span>- <img src="{% static "img/basket.svg" %}" alt="Basket">+ <span class="hidden-sm-down">{% trans "Your cart" %}</span>+ <img src="{% static "img/cart.svg" %}" alt="Cart">{% if cart_counter %}<span class="badge">{{ cart_counter }}</span>{% endif %}</a></div>diff --git a/templates/demo/cart/index.html b/templates/demo/cart/index.htmlindex 6189340aa4..349fef40bb 100644--- a/templates/demo/cart/index.html+++ b/templates/demo/cart/index.html@@ -47,7 +47,8 @@{% else %}<img class="cart-item-image" src="{% static 'images/product-image-placeholder-small.png' %}" alt="">{% endif %}- <h3>{{ line.variant.product }} - {{ line.variant.display_variant }}</h3>+ <h3>{{ line.variant.product }}+ <br><small>{{ line.variant.display_variant }}</small></h3></a></div><div class="col-md-2 col-xs-6 cart-item-amount">