Thread Tools Display Modes
  #1  
Old 06-06-2020, 06:26 AM
Patricia Otero's Avatar
Patricia Otero is offline
Junior Member
 
Join Date: Jun 2020
Posts: 1
Default

Ecwid manage customer cart extended option in php


I have created categories in Ecwid store for products and fetch that category product in 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 its 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>
__________________________________________________ __________________
Paymydoctor

Last edited by Patricia Otero; 06-09-2020 at 10:07 AM.
 

Tags
javascript, jquery, php

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 05:51 PM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.