Bulk add to cart function issuecart vs. mini cart issue … rwd themeRedirect Add to cart button to cart pageAdd to cart issue - Magento 2.1The requested Payment Method is not available When creating an orderM2: reason add-to-cart might not function in production modeAdd to cart issue in some android devicesMagento 2 - custom price can not add to subtotal and grand total after add to cartAdd to cart codeIssue with my cart module on pdp and cart pages, just keeps spinningBulk price and quantity update using rest api
How to hide some fields of struct in C?
Can I say "fingers" when referring to toes?
Why should universal income be universal?
Keeping a ball lost forever
What are some good ways to treat frozen vegetables such that they behave like fresh vegetables when stir frying them?
Can disgust be a key component of horror?
Why would a new[] expression ever invoke a destructor?
Why Shazam when there is already Superman?
What is Cash Advance APR?
Add big quotation marks inside my colorbox
Does Doodling or Improvising on the Piano Have Any Benefits?
Quoting Keynes in a lecture
How does a computer interpret real numbers?
Why does the Sun have different day lengths, but not the gas giants?
It grows, but water kills it
Creepy dinosaur pc game identification
Is there a RAID 0 Equivalent for RAM?
How do you make your own symbol when Detexify fails?
Is there a way to get `mathscr' with lower case letters in pdfLaTeX?
Probability that THHT occurs in a sequence of 10 coin tosses
What should you do when eye contact makes your subordinate uncomfortable?
Did arcade monitors have same pixel aspect ratio as TV sets?
Extract more than nine arguments that occur periodically in a sentence to use in macros in order to typset
Non-trope happy ending?
Bulk add to cart function issue
cart vs. mini cart issue … rwd themeRedirect Add to cart button to cart pageAdd to cart issue - Magento 2.1The requested Payment Method is not available When creating an orderM2: reason add-to-cart might not function in production modeAdd to cart issue in some android devicesMagento 2 - custom price can not add to subtotal and grand total after add to cartAdd to cart codeIssue with my cart module on pdp and cart pages, just keeps spinningBulk price and quantity update using rest api
I added multiple products in the cart using this below script.
<script>
require(['jquery'], function (jquery)
document.getElementById("add").addEventListener("click", function ()
//JipeJryj6w9kBpBD13fTZWz7qm0vinmg
if (localStorage.getItem('gT') !== null)
guestToken = localStorage.getItem('gT');
console.log(guestToken);
var qty = document.getElementById('<?php echo "qty".(string)$count; ?>').value;
if (qty == 0)
qty = NULL;
var settings =
"async": true,
"crossDomain": true,
"url": "<?php echo $baseUrl ?>rest/V1/carts/mine/items",
"method": "POST",
"headers":
"content-type": "application/json",
"authorization": "Bearer <?php echo $block->getToken() ?>",
"cache-control": "no-cache",
"postman-token": "fdf04024-bb48-15e6-77c1-22a9ba841f4d"
,
"processData": false,
"data": JSON.stringify(
"cartItem":
"sku": <?php echo $stringSku ?>,
"qty": qty,
"quote_id": guestToken
),
jquery.ajax(settings).done(function (response)
console.log(response);
);
)
);
This function works fine. But my minicart looks likes this below screenshot.
But when I add products using default method the cart looks fine.
magento2 cart addtocart mini-cart bulk-products-update
add a comment |
I added multiple products in the cart using this below script.
<script>
require(['jquery'], function (jquery)
document.getElementById("add").addEventListener("click", function ()
//JipeJryj6w9kBpBD13fTZWz7qm0vinmg
if (localStorage.getItem('gT') !== null)
guestToken = localStorage.getItem('gT');
console.log(guestToken);
var qty = document.getElementById('<?php echo "qty".(string)$count; ?>').value;
if (qty == 0)
qty = NULL;
var settings =
"async": true,
"crossDomain": true,
"url": "<?php echo $baseUrl ?>rest/V1/carts/mine/items",
"method": "POST",
"headers":
"content-type": "application/json",
"authorization": "Bearer <?php echo $block->getToken() ?>",
"cache-control": "no-cache",
"postman-token": "fdf04024-bb48-15e6-77c1-22a9ba841f4d"
,
"processData": false,
"data": JSON.stringify(
"cartItem":
"sku": <?php echo $stringSku ?>,
"qty": qty,
"quote_id": guestToken
),
jquery.ajax(settings).done(function (response)
console.log(response);
);
)
);
This function works fine. But my minicart looks likes this below screenshot.
But when I add products using default method the cart looks fine.
magento2 cart addtocart mini-cart bulk-products-update
add a comment |
I added multiple products in the cart using this below script.
<script>
require(['jquery'], function (jquery)
document.getElementById("add").addEventListener("click", function ()
//JipeJryj6w9kBpBD13fTZWz7qm0vinmg
if (localStorage.getItem('gT') !== null)
guestToken = localStorage.getItem('gT');
console.log(guestToken);
var qty = document.getElementById('<?php echo "qty".(string)$count; ?>').value;
if (qty == 0)
qty = NULL;
var settings =
"async": true,
"crossDomain": true,
"url": "<?php echo $baseUrl ?>rest/V1/carts/mine/items",
"method": "POST",
"headers":
"content-type": "application/json",
"authorization": "Bearer <?php echo $block->getToken() ?>",
"cache-control": "no-cache",
"postman-token": "fdf04024-bb48-15e6-77c1-22a9ba841f4d"
,
"processData": false,
"data": JSON.stringify(
"cartItem":
"sku": <?php echo $stringSku ?>,
"qty": qty,
"quote_id": guestToken
),
jquery.ajax(settings).done(function (response)
console.log(response);
);
)
);
This function works fine. But my minicart looks likes this below screenshot.
But when I add products using default method the cart looks fine.
magento2 cart addtocart mini-cart bulk-products-update
I added multiple products in the cart using this below script.
<script>
require(['jquery'], function (jquery)
document.getElementById("add").addEventListener("click", function ()
//JipeJryj6w9kBpBD13fTZWz7qm0vinmg
if (localStorage.getItem('gT') !== null)
guestToken = localStorage.getItem('gT');
console.log(guestToken);
var qty = document.getElementById('<?php echo "qty".(string)$count; ?>').value;
if (qty == 0)
qty = NULL;
var settings =
"async": true,
"crossDomain": true,
"url": "<?php echo $baseUrl ?>rest/V1/carts/mine/items",
"method": "POST",
"headers":
"content-type": "application/json",
"authorization": "Bearer <?php echo $block->getToken() ?>",
"cache-control": "no-cache",
"postman-token": "fdf04024-bb48-15e6-77c1-22a9ba841f4d"
,
"processData": false,
"data": JSON.stringify(
"cartItem":
"sku": <?php echo $stringSku ?>,
"qty": qty,
"quote_id": guestToken
),
jquery.ajax(settings).done(function (response)
console.log(response);
);
)
);
This function works fine. But my minicart looks likes this below screenshot.
But when I add products using default method the cart looks fine.
magento2 cart addtocart mini-cart bulk-products-update
magento2 cart addtocart mini-cart bulk-products-update
asked yesterday
Ramesh KRRamesh KR
386112
386112
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f266842%2fbulk-add-to-cart-function-issue%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f266842%2fbulk-add-to-cart-function-issue%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown