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
  #1  
Old 03-09-2020, 08:30 AM
Ava Layla's Avatar
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)
  #2  
Old 03-09-2020, 12:30 PM
Elsa Z.'s Avatar
Elsa Z. Elsa Z. is offline
Ecwid Team
 
Join Date: Dec 2018
Posts: 28
Default

Hi there,

This is Elsa from Ecwid team. I'm glad to assist you!

Please, feel free to send all API/development-related questions directly to apps@ecwid.com. Also, we have a special developer slack community for API questions. Here is the channel where you can ask all API questions:

https://ecwid-community.herokuapp.com/

You can get answers to your questions related to development here as well: https://developers.ecwid.com/contact.

Hope this helps! If you have any other questions, feel free to write back. We are always glad to help.
The Following User Says Thank You to Elsa Z. For This Useful Post:
Jamie Dawson (07-29-2020)
  #3  
Old 05-14-2020, 07:09 PM
Guru Saha's Avatar
Guru Saha Guru Saha is offline
Junior Member
 
Join Date: May 2020
Posts: 2
Default

Hi Elsa, thnax, this was a great note.
The Following User Says Thank You to Guru Saha For This Useful Post:
Jamie Dawson (07-29-2020)
  #4  
Old 06-12-2020, 07:22 AM
Edmon1t's Avatar
Edmon1t Edmon1t is offline
Junior Member
 
Join Date: Jun 2020
Posts: 1
Default

Can we add your store to as many sites as you want, manage it from single place prepaidgiftbalance.
  #5  
Old 06-15-2020, 04:54 AM
Alex Muellar's Avatar
Alex Muellar Alex Muellar is offline
Junior Member
 
Join Date: Jun 2020
Posts: 1
Default

I tried using the code locally and I got this error in the console DQFanSurvey
The Following User Says Thank You to Alex Muellar For This Useful Post:
Jamie Dawson (07-29-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 01:57 PM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.