1

In bigcommerce site I want functionality like anonymous users can upload image for products which he wants to purchase and add to cart.Like this (http://www.woowoonails.com/) site.

When you will open this link you will see Design Your Own Nail Wraps! container on home containing link user your own photos when you will click on this you will be on this link (http://www.woowoonails.com/designer/layout).Here you can upload your photos and click on add to bag. Same functionality I want on my site but I did not get any idea.Bigcommerce team does now allow to upload php file to their server.Then I tried to use api.

But I am not able to configure it.I have downloaded the api from (github.com/bigcommerce/bigcommerce-api-php) .But I am not getting idea how to configure it and use.

I have also download the single php file(raw.github.com/bigcommerce/bigcommerce-api-php/master/bigcommerce.php) and put it inside the Bigcommerce1 folder and then include in my file containing code:

require 'Bigcommerce1/bigcommerce.php';
BigCommerce_Api::configure(array(
    'store_url' => 'siteurl',
    'username'  => 'admin',
    'api_key'   => 'df38dd10e9665a3cfa667817d78ec91ee9384bc3'
));

But nothing work.Can you give me some light about how can I achieve the functionality to upload photos and also about api configuration.

Thanks

4

1 回答 1

0

您想使用 FTP 而不是 BigCommerce API 来捕获图像...... BigCommerce 确实支持文件上传,但据我所知,这是事后的想法,无法通过 API 进行配置。因此,使用 iframe 进行文件上传、捕获文件内容并将其上传到 bigC (s)FTP 服务器进行存储更容易......

这意味着您可以将文件发布到任何其他站点(因此在外部托管)以某个唯一 ID 将其上传到 FTP,并在提交订单时重新加入两者。

另外要连接到 BigCommerce API,最好围绕 BigCommerce 编写或使用包装函数库

因此,例如,由于 API 的 PHP 版本中的错误和不良功能以及编码风格的差异,我们使库基于对象,因此我们只需使用以下命令来获取所有订单“等待履行”并从那里开始工作。 ..

$bcAPI = new bigcommerceAPI();
$orders = $bcAPI->getOrders(); 
$orders = array_filter($orders,function($data){ if($data->status == 'Awaiting Fulfillment'){ return true; } return false; });
于 2013-05-25T16:44:00.957 回答