mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-03-01 19:03:14 +03:00
add catalog export, payment update, few bugfixes
This commit is contained in:
commit
9e01cf490d
@ -6,7 +6,7 @@ Prestashop module for interaction with [IntaroCRM](http://www.intarocrm.com) thr
|
||||
Module allows:
|
||||
|
||||
* Send to IntaroCRM new orders
|
||||
* Configure relations between dictionaries of IntaroCRM and Bitrix (statuses, payments, delivery types and etc)
|
||||
* Configure relations between dictionaries of IntaroCRM and Prestashop (statuses, payments, delivery types and etc)
|
||||
* Generate [ICML](http://docs.intarocrm.ru/index.php?n=Пользователи.ФорматICML) (IntaroCRM Markup Language) for catalog loading by IntaroCRM
|
||||
|
||||
Installation
|
||||
@ -35,4 +35,4 @@ zip -r intarocrm.zip intarocrm
|
||||
#### Install via Admin interface.
|
||||
|
||||
|
||||
Go to Modules -> Add module. After that upload your .zip archive and activate module.
|
||||
Go to Modules -> Add module. After that upload your zipped module and activate it.
|
||||
|
67
composer.lock
generated
Normal file
67
composer.lock
generated
Normal file
@ -0,0 +1,67 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
|
||||
],
|
||||
"hash": "e4583dae732a6e5ebafff8cca46b1984",
|
||||
"packages": [
|
||||
{
|
||||
"name": "intarocrm/rest-api-client",
|
||||
"version": "v1.2.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/intarocrm/rest-api-client",
|
||||
"reference": "b54350ff2f09d8202cf2931895bba8dced4dcf21"
|
||||
},
|
||||
"require": {
|
||||
"ext-curl": "*",
|
||||
"php": ">=5.2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"IntaroCrm\\": "lib/"
|
||||
}
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kruglov Kirill",
|
||||
"email": "kruglov@intaro.ru",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "PHP Client for IntaroCRM REST API",
|
||||
"homepage": "http://www.intarocrm.ru/",
|
||||
"keywords": [
|
||||
"Intaro CRM",
|
||||
"api",
|
||||
"rest"
|
||||
],
|
||||
"support": {
|
||||
"email": "support@intarocrm.ru"
|
||||
},
|
||||
"time": "2014-04-13 09:58:37"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
|
||||
],
|
||||
"aliases": [
|
||||
|
||||
],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [
|
||||
|
||||
],
|
||||
"platform": {
|
||||
"php": ">=5.3"
|
||||
},
|
||||
"platform-dev": [
|
||||
|
||||
]
|
||||
}
|
40
intarocrm/export.tpl
Normal file
40
intarocrm/export.tpl
Normal file
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<yml_catalog date="{$smarty.now|date_format:'%Y-%m-%d %H:%M'}">
|
||||
<shop>
|
||||
<name>{$shop_name}</name>
|
||||
<company>{$yamarket_company_name}</company>
|
||||
<url>{$shop_url}</url>
|
||||
<platform>PrestaShop</platform>
|
||||
<currencies>
|
||||
{foreach from=$currencies item=cur name=currencies}
|
||||
{if $cur.iso_code != 'GBP'}
|
||||
<currency id="{if $cur.iso_code == 'RUB'}RUR{else}{$cur.iso_code}{/if}" rate="{math equation="1/x" x=$cur.conversion_rate}"/>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</currencies>
|
||||
<categories>
|
||||
{foreach from=$categories item=cat name=categories}
|
||||
{if $cat.id_category!=2}
|
||||
<category id="{$cat.id_category}"{if $cat.id_parent and $cat.id_parent!=2} parentId="{$cat.id_parent}"{/if}>{$cat.name}</category>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</categories>
|
||||
{if $yamarket_delivery_price}<local_delivery_cost>{$yamarket_delivery_price}</local_delivery_cost>{/if}
|
||||
<offers>
|
||||
{foreach from=$products item=offer name=products}
|
||||
<offer available="{if $offer.available_for_order}true{else}false{/if}" id="{$offer.id_product}">
|
||||
<url>{$offer.url}</url>
|
||||
<price>{$offer.price}</price>
|
||||
<purchasePrice>{$offer.purchase_price}</purchasePrice>
|
||||
<currencyId>{$currency}</currencyId>
|
||||
<categoryId>{$offer.id_category_default}</categoryId>
|
||||
<picture>{$offer.picture}</picture>
|
||||
<name>{$offer.name}</name>
|
||||
{if $offer.article}
|
||||
<param name="article">{$offer.article}</param>
|
||||
{/if}
|
||||
</offer>
|
||||
{/foreach}
|
||||
</offers>
|
||||
</shop>
|
||||
</yml_catalog>
|
9
intarocrm/index.php
Normal file
9
intarocrm/index.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
include(dirname(__FILE__). '/../../config/config.inc.php');
|
||||
include(dirname(__FILE__). '/../../init.php');
|
||||
include(dirname(__FILE__). '/intarocrm.php');
|
||||
|
||||
header("Content-type: text/xml");
|
||||
|
||||
$export = new IntaroCRM();
|
||||
echo $export->exportCatalog();
|
Loading…
x
Reference in New Issue
Block a user