bigcommerce

How to get Product images via PHP SDK

回眸只為那壹抹淺笑 提交于 2019-12-12 02:33:28
问题 I want to get the product images using the Bigcommerce PHP library. How would I do that? $products=Bigcommerce::getProducts(); foreach($products as $product) { echo $product->name; echo $product->price; }//here i retrieve price and name of products 回答1: The following code will get you the product images... $products=Bigcommerce::getProducts(); foreach($products as $product) { echo $product->name; echo $product->price; echo $product->images[0]->image_file } The line echo $product->images[0]-

Bigcommerce PHP API - No data returned

笑着哭i 提交于 2019-12-12 00:39:12
问题 I'm using the single file PHP library. I've got the store connecting, but I am getting no data back. Here is my script: <?php error_reporting(E_ALL); ini_set('display_errors', True); require 'bigcommerce.php'; use Bigcommerce\Api\Client as Bigcommerce; $settings = array('store_url' => 'https://STORE_URL_REDACTED.mybigcommerce.com','username' => 'USERNAME_REDACTED', 'api_key' => 'API_KEY_REDACTED'); if( (array_key_exists('store_url', (array)$settings)) && (array_key_exists('username',

How to “log customer in” in through BigCommerce and give them access to a custom website

倖福魔咒の 提交于 2019-12-11 23:35:45
问题 I have an existing website that uses Bigcommerce and I have a large customer list. I want to be able to give all of my customers access to a secondary website using their same login/password that they use to log into my BigCommerce website. Is there a way for me to let them login to BigCommerce and my website can verify that that customer is who they say they are? This would be very useful for my high value customers who want a custom portal that I cannot build into BigCommerce because I don

BigCommerce OAuth “Invalid scope” error

不想你离开。 提交于 2019-12-11 14:17:25
问题 I'm attempting to retrieve an access token from BigCommerce. I'm following the instructions on this page: https://developer.bigcommerce.com/apps/callback When I try to retrieve the access token, I am getting an invalid scope error. Here's the code: public function access_token_get(){ print_r($_GET); $tokenUrl = "https://login.bigcommerce.com/oauth2/token"; $connection = new Connection(); $connection->setCipher('RC4-SHA'); $connection->verifyPeer(false); $response = $connection->post($tokenUrl

Bigcommerce Stencil Custom Handlebars “Replace” Helper

左心房为你撑大大i 提交于 2019-12-11 12:15:11
问题 Is there a syntax example for using the "replace" handlebars helper? The doc is rather vague on the practical usage. Link to doc: here For instance: If I had a page name of "About Us" and I wanted to replace the space with a "-". I have tried {{replace name " " "-"}} to no avail. 回答1: We've revised the documentation on for handlebars.js helpers to include this example: The following code would search for the string needle within the scope defined by haystack; if found, it would replace that

BigCommerce Uploading Tracking Numbers

余生颓废 提交于 2019-12-11 11:48:48
问题 Is there currently a way to upload a tracking number back to an order on BigCommerce in php? I can see on BigCommerce's API Doc for Shipments that there is a parameter to specific a tracking number for a PUT command. I also see that there is an update function within the Shipment.php file. However, I am unsure how to call the function that would allow me to do that, or if it is even possible upload a tracking number. Below is a snippet from shipment.php namespace Bigcommerce\Api\Resources;

Error 'stencil init' when installing stencil-cli and base theme

十年热恋 提交于 2019-12-11 08:39:30
问题 I'm trying to install the stencil-cli and base theme following the instructions in the documentation. I successfully installed stencil-cli after I used a node version manager and changed it to version 4.6.1, but after cloning the theme and running npm install I get the following error after trying to run stencil init: $ stencil init module.js:327 throw err; ^ Error: Cannot find module 'C:\Users\dannytaki\AppData\Roaming\npm\node_modules\@bigcommerce\stencil-cli\bin\stencil' at Function.Module

How to fix Slick Slider (Slick.JS) if it breaks on click event within the div?

牧云@^-^@ 提交于 2019-12-11 08:04:16
问题 I added Slick slider for any device under 1024px, however every time a button within the div is clicked and the page is refreshed, the slider is gone and it leaves a mess. It fixes itself if I change the device width from the console. I tried adding a function to reinitialize it every time a button is clicked, but for some reason 'reInit' does not work. I can't provide Jsfiddle, if someone could help based on my description, I would appreciate it. function slickify(){ event.preventDefault();

Bigcommerce - How to redirect users to login page from homepage if not logged in

廉价感情. 提交于 2019-12-11 08:03:36
问题 How do I have customers see the login page instead of the homepage if they are not logged in? I tried using the following code but it redirects to the login page even if the customer is logged in. <script language="javascript" type="text/javascript">//<![CDATA[ if (window.location.href.toString() == "http://www.mywebsite.com/") { window.location.assign("http://www.mywebsite.com/login.php"); } //]]></script> 回答1: You can detect whether or not the user is logged in by looking at the welcome

Bigcommerce Authentication code

时间秒杀一切 提交于 2019-12-11 06:49:52
问题 How to get Authentication code ? I am using https://login.bigcommerce.com/oauth2 url and passing client_id={0}&redirect_uri={1}&response_type=code{2}{3} in get method, but it gives me error "The page you were looking for doesn't exist." I know after getting Authentication code I can generate token. But first step is no tclear how to get Authentication code using login page? 回答1: I just went through this oauth token issue and the docs haven't been much help, but once I got going I finally