The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-09-2020, 08:30 AM
Ava Layla's Avatar
Ava Layla Ava Layla is offline
Junior Member
 
Join Date: Feb 2020
Posts: 3
Default Ecwid manage customer cart extended option in php

I have created categories in Ecwid store for products and fetch that category product on my website using ecwid API I am passing product-id to next detail page and by using product id parse product data from ecwid product API like quantity, price and options for that specific product.
Now by using Ecwid addProduct extended option, I am trying to pass product data for Add to cart functionality it's not working.

Code:
<script src="//app.ecwid.com/script.js?10998147" type="text/javascript" charset="UTF-8"></script>
<script>
var quant = $('#calquantity').val();
var product = {
  id: "<?php $product_id;?>",
  quantity: quant,
  callback: function(success, product, cart) {
  }
}
Ecwid.Cart.addProduct(productID, function(success, product, cart){
  console.log(success);
  console.log(product.name);
})

</script>

Last edited by Ava Layla; 05-07-2020 at 08:39 AM.
The Following 3 Users Say Thank You to Ava Layla For This Useful Post:
Jamie Dawson (07-29-2020), Roden McMichael (10-05-2020), Valenzuela (07-17-2020)
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:38 AM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.