Здравейте, имам нужда от малко професионална помощ относно интеграцията. Открих две теми в този форум
и
, но от Pazaruvaj са направили промени в кода.
Новият код е:
$Client = new TrustedShop('123456789...'); - е ясен.
Ще работи ли коректно ако заменя:
За този код нямам никаква идея:
Моля помагайте!
Opencart + pazaruvaj.com
Здравейте, имам следния проблем, искам да направя магазина си "Коректен магазин" в сайта pazaruvaj.com като за целта са ми предоставили скрипт, който трябва да поставя на страницата с потвържение на поръчката, но когато го направя ми излизат грешки. Досега не съм писала особено много на php и...
www.predpriemach.com
OpenCart 2.1.0.1 интеграция на Коректен Магазин в pazaruvaj.com
Здравейте, Нов съм във форума, но точно тази тема ме доведе тук :) Боря се с интеграцията на коректен магазин при pazaruvaj.com. Единственото, което откривам тук е това : https://www.predpriemach.com/threads/opencart-pazaruvaj-com.47735/ ,но за съжаление не сработва, спрямо инструкциите. Не...
www.predpriemach.com
Новият код е:
който мисля, че трябва да вградя в /catalog/controller/checkout/success.php<?php
/*******************************************************************************
* Pazaruvaj.com trusted shop program
* Example code integration to the webshop
*
*
* Please note, that the example detailed below can not be simply copy-pasted
* into your webshop’s code, it has to be customized adequately.
*
* Setup steps:
* 1. Copy TrustedShop.php file to a place accessible by the webshop engine.
* 2. Copy this example code to the page of the webshop where the e-mail address
* of the customer and the names of the purchased products are retrievable
* from the webshop engine. Generally this is the webshop’s confirmation
* page of the purchase.
* 3. Customize the pasted example code according to the following:
* - Modify path of TrustedShop.php in require_once() in such a way that
* the webshop engine can use it.
* - Check that the proper WebAPI key is set, if not, modify it. You can find
* the WebAPI key on the partner portal.
* - Set the customer’s e-mail address.
* - Add the names of the purchased products.
* - Implement an error handling if you want (optional).
*
******************************************************************************/
require_once 'TrustedShop.php';
try {
/** Provide your own WebAPI key. You can find your WebAPI key on your partner portal. */
$Client = new TrustedShop('123456789...');
/** Provide the e-mail address of your customer. You can retrieve the e-amil address from the webshop engine. */
$Client->SetEmail('[email protected]');
/** Customer's cart example. */
$Cart = array(
'AAA111' => 'Name of first purchased product',
'BBB222' => 'Name of second purchased product'
);
/** Provide the name and the identifier of the purchased products.
* You can get those from the webshop engine.
* It must be called for each of the purchased products. */
foreach($Cart as $ProductIdentifier => $ProductName) {
/** If both product name and identifier are available, you can provide them this way: */
$Client->AddProduct($ProductName, $ProductIdentifier);
/** If only product name is available, you can provide it with the following call: */
$Client->AddProduct($ProductName);
/** If neither is available, you can leave out these calls. */
}
/** This method perpares to send us the e-mail address and the name of the purchased products set above.
* It returns an HTML code snippet which must be added to the webshop's source.
* After the generated code is downloaded into the customer's browser it begins to send purchase information. */
echo $Client->Prepare();
/** Here you can implement error handling. The error message can be obtained in the manner shown below. This step is optional. */
} catch (Exception $Ex) {
$ErrorMessage = $Ex->getMessage();
}
$Client = new TrustedShop('123456789...'); - е ясен.
Ще работи ли коректно ако заменя:
с$Client->SetEmail('[email protected]');
?$Client->SetEmail('$this->customer->isLogged() ? $this->customer->getEmail() : $this->session->data['guest']['email']');
За този код нямам никаква идея:
/** Customer's cart example. */
$Cart = array(
'AAA111' => 'Name of first purchased product',
'BBB222' => 'Name of second purchased product'
);
Моля помагайте!