PHP code example of zaius / zaius-magento-1
1. Go to this page and download the library: Download zaius/zaius-magento-1 library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zaius / zaius-magento-1 example snippets
zaiusEngageLocales();
zaiusEngageCustomers();
$jsonOpts = array(
"sessionId" => $sessionId,
"jsonOpts" => json_encode(array(
"updated_at" => "2018-01-01",
"created_at" => "2018-01-01",
"id" => 1,
"email" => "[email protected] ",
"limit" => 5,
"offset" => 0
))
);
zaiusEngageProducts();
$jsonOpts = array(
"sessionId" => $sessionId,
"jsonOpts" => json_encode(array(
"updated_at" => "2018-01-01",
"created_at" => "2018-01-01",
"type_id" => "simple",
"store_view_code" => "french",
"synthetic_upsert_default" => true,
"append_store_view_code" => true,
"product_id" => 240,
"sku" => "mtk000",
"limit" => 5,
"offset" => 0
))
);
zaiusEngageOrders();
$jsonOpts = array(
"sessionId" => $sessionId,
"jsonOpts" => json_encode(array(
"updated_at" => "2018-01-01",
"created_at" => "2018-01-01",
"refund" => true,
"cancel" => true,
"id" => 123,
"entity_id" => 123,
"customer_id" => 123,
"email" => "[email protected] "
))
);
zaiusEngageCreateCoupons();
$jsonOpts = array(
"sessionId" => $sessionId,
"jsonOpts" => json_encode(array(
"rule_id" => 1,
"format" => "alphanum",
"qty" => 12,
"length" => 12,
"delimiter" => "",
"dash" => "",
"prefix" => "prefix",
"suffix" => "suffix"
))
);
zaiusEngageSubscribers();
zaiusEngageConfiguration();
bash
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
json
$jsonOpts = array(
"sessionId" => $sessionId,
"jsonOpts" => json_encode(array(
"limit" => 5,
"offset" => 0
))
);
json
array(1) {
["locales"]=>
array(2) {
["french"]=>
array(5) {
["label"]=>
string(15) "French (France)"
["code"]=>
string(5) "fr_FR"
["currency_symbol"]=>
string(3) "€"
["currency_code"]=>
string(3) "EUR"
["base_url"]=>
string(18) "http://zaius.mage/"
}
["german"]=>
array(5) {
["label"]=>
string(16) "German (Germany)"
["code"]=>
string(5) "de_DE"
["currency_symbol"]=>
string(3) "€"
["currency_code"]=>
string(3) "EUR"
["base_url"]=>
string(18) "http://zaius.mage/"
}
}
}
json
array(1) {
[0]=>
array(2) {
["type"]=>
string(7) "product"
["data"]=>
array(12) {
["product_id"]=>
string(3) "231"
["product_url"]=>
string(56) "http://zaius.mage/index.php/catalog/product/view/id/231/"
["name"]=>
string(31) "French Cuff Cotton Twill Oxford"
["sku"]=>
string(6) "msj000"
["description"]=>
string(126) "Made with wrinkle resistant cotton twill, this French-cuffed luxury dress shirt is perfect for Business Class frequent flyers."
["image_url"]=>
string(52) "http://zaius.mage/media/catalog/product/no_selection"
["category"]=>
string(31) "Default Category > Men > Shirts"
["price"]=>
string(8) "190.0000"
["qty"]=>
string(7) "15.0000"
["is_in_stock"]=>
string(1) "1"
["parent_product_id"]=>
string(3) "402"
["zaius_engage_version"]=>
array(1) {
[0]=>
string(6) "0.13.1"
}
}
}
json
array(2) {
["type"]=>
string(6) "coupon"
["data"]=>
array(2) {
["zaius_engage_version"]=>
string(6) "0.13.1"
["codes"]=>
array(1) {
[0]=>
string(12) "DSTXKP2I567N"
}
}
}
json
$jsonOpts = array(
"sessionId" => $sessionId,
"jsonOpts" => json_encode(array(
"updated_at" => "2018-01-01",
"created_at" => "2018-01-01"
))
);
json
array(1) {
[0]=>
array(2) {
["type"]=>
string(10) "subscriber"
["data"]=>
array(5) {
["email"]=>
string(18) "[email protected] "
["list_id"]=>
string(18) "default_newsletter"
["subscribed"]=>
bool(true)
["ts"]=>
string(19) "2018-05-21 09:48:23"
["zaius_engage_version"]=>
array(1) {
[0]=>
string(6) "0.13.1"
}
}
}
json
$jsonOpts = array(
"jsonOpts" => json_encode(array(
"zaius_tracking_id" => "RanDOmZaIus-tRAcKinGiD"
))
);
json
array(3) {
["default"]=>
array(7) {
["wsi_enabled"]=>
bool(true)
["magento_fpc_enabled"]=>
bool(false)
["magento_edition"]=>
string(9) "Community"
["magento_version"]=>
string(7) "1.9.3.9"
["zaius_engage_version"]=>
string(6) "0.13.1"
["zaius_engage_enabled"]=>
bool(true)
["config"]=>
array(3) {
["zaius_config"]=>
array(8) {
["zaius_newsletter_list_id"]=>
string(10) "newsletter"
["track_orders_on_frontend"]=>
string(1) "1"
["track_product_listings"]=>
string(1) "0"
["use_magento_customer_id"]=>
string(1) "1"
["tracking_id"]=>
string(22) "piUzfdlpdHM-rtbS6OpeCQ"
["global_id_prefix"]=>
string(0) ""
["collect_all_product_attributes"]=>
string(1) "0"
["reported_currency"]=>
string(1) "0"
}
["zaius_cron"]=>
array(2) {
["active"]=>
string(1) "0"
["cron_settings"]=>
string(11) "*/5 * * * *"
}
["zaius_localizations"]=>
array(1) {
["locale_toggle"]=>
string(1) "0"
}
}
}
["french"]=>
array(7) {
["magento_fpc_enabled"]=>
bool(false)
["magento_edition"]=>
string(9) "Community"
["wsi_enabled"]=>
bool(true)
["magento_version"]=>
string(7) "1.9.3.9"
["zaius_engage_version"]=>
string(6) "0.13.1"
["zaius_engage_enabled"]=>
bool(true)
["config"]=>
array(3) {
["zaius_config"]=>
array(8) {
["zaius_newsletter_list_id"]=>
string(10) "newsletter"
["track_orders_on_frontend"]=>
string(1) "1"
["track_product_listings"]=>
string(1) "0"
["use_magento_customer_id"]=>
string(1) "1"
["tracking_id"]=>
string(22) "piUzfdlpdHM-rtbS6OpeCQ"
["global_id_prefix"]=>
string(0) ""
["collect_all_product_attributes"]=>
string(1) "0"
["reported_currency"]=>
string(1) "0"
}
["zaius_cron"]=>
array(2) {
["active"]=>
string(1) "0"
["cron_settings"]=>
string(11) "*/5 * * * *"
}
["zaius_localizations"]=>
array(1) {
["locale_toggle"]=>
string(1) "0"
}
}
}
["german"]=>
array(7) {
["magento_fpc_enabled"]=>
bool(false)
["magento_edition"]=>
string(9) "Community"
["wsi_enabled"]=>
bool(true)
["magento_version"]=>
string(7) "1.9.3.9"
["zaius_engage_version"]=>
string(6) "0.13.1"
["zaius_engage_enabled"]=>
bool(true)
["config"]=>
array(3) {
["zaius_config"]=>
array(8) {
["zaius_newsletter_list_id"]=>
string(10) "newsletter"
["track_orders_on_frontend"]=>
string(1) "1"
["track_product_listings"]=>
string(1) "0"
["use_magento_customer_id"]=>
string(1) "1"
["tracking_id"]=>
string(22) "piUzfdlpdHM-rtbS6OpeCQ"
["global_id_prefix"]=>
string(0) ""
["collect_all_product_attributes"]=>
string(1) "0"
["reported_currency"]=>
string(1) "0"
}
["zaius_cron"]=>
array(2) {
["active"]=>
string(1) "0"
["cron_settings"]=>
string(11) "*/5 * * * *"
}
["zaius_localizations"]=>
array(1) {
["locale_toggle"]=>
string(1) "0"
}
}
}
}