This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class OrderDeskApiClient | |
{ | |
private $store_id; | |
private $api_key; | |
private $base_url = "https://app.orderdesk.me/api/v2"; | |
public $last_status_code = ""; | |
public function __construct($store_id, $api_key) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if is_anonymous == 0 %} | |
{% set timestamp = checkout_date|date_modify("+5 minutes")|date("U") %} | |
<script type="text/javascript"> | |
jQuery.ajax({ | |
url: 'http://YOURSITE.COM/foxycart-checkout-complete/?fc_auth_token={{ generate_sso_token(timestamp) }}×tamp={{ timestamp }}&foxycart_customer_id={{ customer_id }}', | |
dataType: 'jsonp' | |
}); | |
</script> | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if is_anonymous == 0 %} | |
{% set timestamp = checkout_date|date_modify("+5 minutes")|date("U") %} | |
<script type="text/javascript"> | |
jQuery(".fc-receipt-action--continue a.fc-button").attr("href", "http://YOURSITE.COM/foxycart-checkout-complete/?fc_auth_token={{ generate_sso_token(timestamp) }}×tamp={{ timestamp }}&foxycart_customer_id={{ customer_id }}"); | |
</script> | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Order Desk API: Delete Shipments | |
//To get your Store ID and API Key, go to Order Desk > Settings > Advanced | |
//Setup | |
$store_id = 0; | |
$api_key = ""; | |
//Required: source_id or order_id | |
//Required: tracking_number or shipment_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Check For Order | |
if (!isset($_POST['order'])) { | |
header(':', true, 400); | |
die('No Data Found'); | |
} | |
//Cbeck Store ID | |
//Be sure to set your store ID. Ask Order Desk support if you aren't sure what it is. | |
if (!isset($_SERVER['HTTP_X_ORDER_DESK_STORE_ID']) || $_SERVER['HTTP_X_ORDER_DESK_STORE_ID'] != "YOUR-STORE-ID") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Order Desk API: Get Inventory Items | |
//To get your Store ID and API Key, go to Order Desk > Settings > Advanced | |
//Setup | |
$store_id = 0; | |
$api_key = ""; | |
//Setup cURL Variables | |
$url = "https://app.orderdesk.me/api/inventory_items"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Order Desk API: Insert New Shipments | |
//To get your Store ID and API Key, go to Order Desk > Settings > Advanced | |
//Setup | |
$store_id = 0; | |
$api_key = ""; | |
//Build Shipment Here | |
$new_shipments = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* | |
************************************************************************** | |
Plugin Name: FoxyShop Wholesale User Add-on | |
Plugin URI: http://www.foxytools.com/ | |
Description: Adds Wholesale User Support, Advanced Custom Fields required | |
Author: SparkWeb Interactive, Inc. | |
Version: 1.0 | |
Author URI: http://www.sparkweb.net/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Order Desk API: Get Order List | |
//To get your Store ID and API Key, go to Order Desk > Settings > Advanced | |
//Setup | |
$store_id = 0; | |
$api_key = ""; | |
//Setup Query | |
$args = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Author: David Hollander, www.sparkweb.net | |
//Recommendation: install this script on your server and setup a cron to run it every few hours. | |
//Set Config Details | |
$domain = ""; //yourstore.foxycart.com | |
$apikey = ""; | |
$days_to_check = 7; | |
//Make sure we are set up |
NewerOlder