diglin_ricento - Version 1.3.0

Version Notes

## Version 1.3.0
- ENHANCEMENT: update API calls due to replacement of API methods with new methods name. Important: extension users MUST update to this version otherwise the extension won't work on 27.08.2015 cause of the ricardo API update.
- ENHANCEMENT: send pictures in base64 encoding instead using bytes array. Decrease memory used on server side
- ENHANCEMENT: update Support controllers due to Magento security patches
- ENHANCEMENT: change the payment information box with article ID instead of the transaction ID (users are not aware about this transaction ID)
- ENHANCEMENT: allow to create orders with products not in stock on Magento side.
- FIX: issue with stopped products when there were in reactivation phase on ricardo.ch side
- FIX: issue with products which should start immediately
- FIX: several issues depending on some shops having third party extensions which may in conflict with the logic of this extension
- FIX: issue with links to products from the log grid
- FIX: issue with merging of orders under certain conditions depending on when the customers ordered several products of the shop owner
- FIX: issue while resizing tall pictures hanging listing synchronization cause of pictures to big

## Version 1.2.0
- FEATURE: add column into customer (ricardo username) and order grid (is ricardo order?). Configurable to show them or not from configuration page of the extension
- FIX: amount of products to get fees is limited to 200 on ricardo.ch side. Get fees even if a shop owner has more than 200 article in the product list

## Version 1.1.3
- ENHANCEMENT: add notifications to get news about the extension when updates are available. This can be via the configuration disabled.
- ENHANCEMENT: add configuration options for watermark picture to publish products with a specific watermark for the ricardo.ch platform
- ENHANCEMENT: add configuration options to allow or not to use the product image placeholder of a shop owner in case of issue with missing picture files on server or in case of memory limit error
- FIX: missing transactions import when products were already sold
- FIX: prevent to stop an article if it has been sold but has been automatically reactivated on ricardo.ch side
- FIX: status of products was not correctly set when a product is sold and internally saved
- FIX: display of category mapping popup on IE < 9
- FIX: confirmation fees popup on IE all versions
- FIX: issue when trying to warm up product pictures while saving product listing items with products having no picture basic selection
- FIX: price calculation when orders are imported into a non Swiss shop

## Version 1.1.2
- ENHANCEMENT: allow html code for payment information
- ENHANCEMENT: prevent unwanted email sending
- ENHANCEMENT: add system.log in the configuration export for assistance purpose
- FIX: issue with quantity to use when publishing on ricardo.ch if the product inventory is not managed
- FIX: prevent to use default Magento picture if an article do not set base picture for a product
- FIX: add missing french token expiration email template
- FIX: issue with some store configuration having several store views but no default store (made some issue to get current currency value)

## Version 1.1.1
- ENHANCEMENT: warm up the cache of picture after a product is inserted in the product list
- FIX: issue with logic to get sold and unsold articles necessary when articles were planned then publicly available and in the meantime has been sold without that the extension knows about the new article ID

## Version 1.1.0
- NEW: add buttons to export configuration into a tar.gz archive and/or send it to support shop owner in case of issue with all necessary information: php, magento, installed modules version, ricardo and latest order tables from the database, log files. No customer information are saved.
- NEW: support currency conversion based on the defined Magento currencies rate. It sets prices in CHF to ricardo.ch, products with price catalog in EUR/USD/... and does the opposite while importing a ricardo order in Magento (CHF to EUR/USD/...). Magento Currency Rates must be configured to work.
- NEW: while selecting a ricardo category, you can now provide the product name to get a suggestion of the category/ies you may use
- NEW: display a popup window with a summary of the fees for the current product list before to proceed "Check and List". Data of the form are saved when relevant before to display these fees
- NEW: allow to merge short and description if ricardo description is missing at product level and if the extension is configured for that - Default "disabled"
- NEW: support Magento Watermark Pictures
- NEW: add ricardo banner in the dashboard of the extension
- ENHANCEMENT: make description with carriage return to
HTML Tag configurable - default is 0
- ENHANCEMENT: refactor order import process to reduce potential issues
- ENHANCEMENT: add a new dispatcher to close articles properly for those which are not anymore available on ricardo.ch
- ENHANCEMENT: global performance improvement with the ricardo API and product pictures (> X MB - image attribute and media gallery)
- ENHANCEMENT: configurable products and their options having price are computed differently, it fixes some issues with price calculation but also allow Fees calculation
- ENHANCEMENT: links of the backend user interface depending on the user language are correctly defined (french or german)
- ENHANCEMENT: related products of configurable products are displayed in the products grid of a list after a product is added or after the products listing is saved instead to wait that the product listing is checked
- ENHANCEMENT: cleanup, factorize and perform code related to configurable products
- ENHANCEMENT: set auto increment value of auction sales type to 1 per default
- ENHANCEMENT: the inventory column in the products grid of the products listing has several meaning: 1) if the product is already listed, the value displayed is the quantity of product sent and still available on ricardo, 2) if the product is not yet listed, the quantity displayed is calculated based on the configuration at the product list or the product level, it will be automatically refreshed if the stock of the product changed before it is listed.
- FIX: issue with price calculation when price scope is per website instead global
- FIX: issue with grouped product quantity - default is 1 if related products don't have quantity defined
- FIX: issue with order synchronization on Magento 1.7 and the ricardo payment method
- FIX: issue with Internet Explorer when configuring a product and using defaults values are not expected
- FIX: some translations issue
- FIX: issue with shipping description while editing the configuration at product level into a products listing
- FIX: memory issue due to pictures too big and API requirements (bytes array)
- FIX: issue with MagentoConnect install

## Version 1.0.18
- Add improvements brought by the ricardo library

## Version 1.0.17
- Fix an issue with the transfer of the data via API

## Version 1.0.16
- 077aced Fix issue with wrong memory test at picture level
- 4fb9f9f Change comment
- 0acd985 Improve memory consumption due to images and expected bytes array on ricardo API side
- 411b1b8 Change url for the ricardo assistant on production
- 05d9364 Update README for license information
- 947efb5 Factorize some process in order creation
- 970f5ee Update translation string
- ccc9802 Update translation string "Until sold"
- 73aadc0 [ENHANCE] Seems that external extension instantiate the shipping class, as it is outside of the order scope, an object is missing and provide an error. We fixed it even if we don't support externa
- b161609 [ENHANCE] Prevent memory consumption due to the size of pictures and the fact that we need to unpack the pictures bytes to create bytes array for the ricardo.ch API
- 41e95ee Update Copyright to ricardo.ch AG (keep same license)
- 128b28d Update config.xml version
- 29b5e61 Update language string key in CSV files

## Version 1.0.15
- 8cc97f0 [ENHANCE] Delete old jobs in the SQL way (no collection), speed up the delete and may prevent mysql error
- 571d315 Open new window for a link located into the product list and jumping into ricardo.ch website
- d6be0f1 [BUGFIX] Change the translation string from Ricardo to ricardo.ch
- 195c744 Cosmetic code improvements
- ddd1ff0 Fix an issue with deleting product item from a listing
- 7a71702 Revert deleted xml file to generate magento connect package
- 7fc6abb Update order dispatcher to get error messages
- 6804aba Update Hint.php

## Version 1.0.14
- Fix an issue revealed after fixes done in version 1.0.13 related to getting sales options and rules from products listing item during getting new orders

## Version 1.0.13
- Important fix for price products (and sales options & rules in general) when several listing processes running at same time

## Version 1.0.12
- 7485ad0 Prevent Exception while editing product if API problem appear while conditions options
- 2927622 Add translation for frontend, change payment info template
- 29069ea Fix wrong variable name for payment method instruction
- 1738457 add payment block info in frontend area too for email generated from backend
- 259f885 Fix issue with products grid and massaction
- 8d37514 Update readme file
- ea18812 Redirect to edit page if error occur
- 0fe5a3c Implement Bank information display if ricardo.ch payment method Bank transfer is used, Remove the cleanup listing log as it is duplicate with the job cleanup
- 9cd82a8 Change order of the tab display 1) Synchronization 2) Listing Log instead of the opposite
- bc809c0 Fix random security error message on fresh install

## Version 1.0.10
- e2304ab Change the status of an item to stop if the item has not been sold. It will stop the complete list if all items are stopped.
- e2c0676 Set website Id while saving new customer even if store id was also provided to be sure that the user is saved into the correct website
- 0d01b4a Fix missing log url in message
- ff1005c Skip required option when creating an order, also for custom option
- 9b48ef6 Fix missing home number

## Version 1.0.9
- Fix issue with some optional API property set to 0 (like template Id)
- 0c1eb42 Revert temporary success / error in dispatcher list , improve translations of string in product grid
- 74c3284 Show a small message in sync grid while running or chunk running to allow to differentiate both kind of sync
- 68eed7f Raise to 400 items to trigger in dispatch
- 1d3a839 Prevent create a new job while having a chunk running sync list
- 3241ef0 Change the way to handle the bucket of items in the dispatcher, fix a bug while triggering the order dispatcher and getting the list of listed items
- adcbc59 Improve message display in sync grid
- 6b6c45e Fix issue with "Until Sold" feature
- 2f48ea4 Improve the way to set/get successful or error log item
- 86fcc17 Display Product list name in the sync log grid instead to put it as message
- 1219b09 Fix issue with products grid and configurable products having article inserted also as simple article
- 95efdca Fix duplicate collection item error
- 4d38ed3 Make the option Schedule Reactivation "Until Sold" better explicit and working
- 03bc9cd Update code documentation
- 658c9f6 In some cases, picture's extension is not recognized so change the logic to determine if it exists or not Catch Exception and log them in cron class

## Version 1.0.8
- b5f1afa Update translations file
- c0d3fbb Fix issue with dispatcher and completed status
- 27c48c9 Fix interface issue (invisible language was also required input) with language selection and payment method "other" which needs a payment description and shipping description field if shipping "other" is selected
- 9e0be11 Improve debugging content when dispatcher mets errors
- b994fa0 Improve grid translations for products
- 84baa1b Change order of token DEV/PROD configuration fields
- 868e576 Fix issue with product price max limit (should be only for "Buy now" and payment method with credit card)
- 379a51b Fix issue with too long strings saved into DB if error occurred
- 0eb9f8d Cosmetic code changes
- 79ce926 Change translation
- 356c909 Fix issue with job message and json encoding (some loop appeared in some use cases)
- 738f316 Better judge if some values must be retrieved from the API depending if the extension is configured or not
- cd34d94 Prevent loop when doing the dispatch
- 14d3beb fix uninstall file txt with wrong language folder package
- a5e6350 Fix translation issue in the sync grid
- 90a2f7c Fix issue if extension is disabled with payment and shipping methods
- 33055cc Add nl2br for description

## Version 1.0.7
- 42f18da Prevent warning messages for some variables, Prevent Exception when picture doesn't exist in preview, set per default the dev mode to 1 because user receives BETA API Token first and some people doesn't set correctly the configuration
- 29767d9 Add more condition to display error in case of wrong API configuration and coming from banner notification
- 57da567 Invite user to check his configuration if a problem occurs
- c514cb0 Merge branch 'develop'

## Version 1.0.6
- 6a6ca4f Do not set the status of the parent configurable product when list on ricardo.ch
- eb0d25a Handle correctly errors if done in the backend notification banner
- 68f812a add short description as fallback product description
- bb0c931 change redirect url and add error message
- c4fbe49 Check and List action: save also product listing information
- 349218a Merge branch 'develop' of git://github.com/diglin/ricento into develop
- f467eb4 Fix issue with grid of products after filter reset (missing form key hidden field)
- 4cc8e3b Revert changes done for RIC-102, display products item w/o any error
- afb9215 Add new url to register to the API
- c0b50e9 In case errors are coming from the API but it is at backend notification level, we catch the error and display it as session error message
- 7d0c803 Merge branch 'develop' of github.com:diglin/ricento into develop
- 068a409 allow to delete a job even if it is running, fix some typo translations, allow to save when clicking on "check and list" button from a product listing

## Version 1.0.5
- c1b3c90 Merge branch 'develop'
- 9f59a2f Fix definitely issue RIC-102 with product grid display
- 3c3547a Fix issue RIC-102: product grid display in product listing with some configuration provide error cause of the collection and duplicate items found
- 5d1706e Merge pull request #1 from diglin/develop

## Version 1.0.4
- ebaec62 Remove the filter collection to not get "not visible" products. Don't remember the reason of this filter, hope it doesn't have consequence with order creation (normally no)
- 90e2a93 Merge branch 'develop'

## Version 1.0.3
- c55a6dd Fix issue with wrong store id, should not be website id while getting storeConfig
- 00c2960 Update README.md

## Version 1.0.2
- 880dbfd Fix issue if API not yet configured and Product Edit Page is requested from the backend
- 5841d06 Update gitsubmodule (replace bitbucket with github)
- be2b77a Update readme file
- 9384e3c Update doc

Download this release

Release Info

Developer diglin
Extension diglin_ricento
Version 1.3.0
Comparing to
See all releases


Code changes from version 1.2.0 to 1.3.0

Files changed (43) hide show
  1. app/code/community/Diglin/Ricento/.DS_Store +0 -0
  2. app/code/community/Diglin/Ricento/Block/.DS_Store +0 -0
  3. app/code/community/Diglin/Ricento/Block/Adminhtml/Log/Listing/Grid.php +1 -1
  4. app/code/community/Diglin/Ricento/Block/Adminhtml/Products/Listing/Edit/Renderer/Inventory.php +2 -2
  5. {lib/Diglin/Ricardo/Enums → app/code/community/Diglin/Ricento/Controller}/.DS_Store +0 -0
  6. {lib/Diglin/Ricardo/Managers → app/code/community/Diglin/Ricento/Helper}/.DS_Store +0 -0
  7. app/code/community/Diglin/Ricento/Helper/Data.php +2 -2
  8. app/code/community/Diglin/Ricento/Helper/Image.php +1 -1
  9. app/code/community/Diglin/Ricento/Model/.DS_Store +0 -0
  10. app/code/community/Diglin/Ricento/Model/Api/Services/Sell.php +2 -2
  11. app/code/community/Diglin/Ricento/Model/Config/Source/Sync/Type.php +1 -0
  12. app/code/community/Diglin/Ricento/Model/Cron.php +8 -3
  13. app/code/community/Diglin/Ricento/Model/Dispatcher/Abstract.php +1 -1
  14. app/code/community/Diglin/Ricento/Model/Dispatcher/Closed.php +97 -14
  15. app/code/community/Diglin/Ricento/Model/Dispatcher/Order.php +35 -501
  16. app/code/community/Diglin/Ricento/Model/Dispatcher/Stop.php +1 -0
  17. app/code/community/Diglin/Ricento/Model/Dispatcher/Transaction.php +524 -0
  18. app/code/community/Diglin/Ricento/Model/Observer.php +3 -2
  19. app/code/community/Diglin/Ricento/Model/Products/Listing/Item.php +5 -1
  20. app/code/community/Diglin/Ricento/Model/Products/Listing/Log.php +1 -0
  21. app/code/community/Diglin/Ricento/Model/Sync/Job.php +1 -0
  22. app/code/community/Diglin/Ricento/Model/Validate/Products/Item.php +1 -1
  23. {lib/Diglin/Ricardo → app/code/community/Diglin/Ricento/Test}/.DS_Store +0 -0
  24. app/code/community/Diglin/Ricento/controllers/.DS_Store +0 -0
  25. app/code/community/Diglin/Ricento/controllers/Adminhtml/IndexController.php +1 -4
  26. app/code/community/Diglin/Ricento/controllers/Adminhtml/Products/Listing/ItemController.php +7 -1
  27. app/code/community/Diglin/Ricento/controllers/Adminhtml/SupportController.php +15 -0
  28. app/code/community/Diglin/Ricento/data/.DS_Store +0 -0
  29. app/code/community/Diglin/Ricento/etc/config.xml +4 -1
  30. app/code/community/Diglin/Ricento/sql/.DS_Store +0 -0
  31. app/design/adminhtml/default/default/template/ricento/payment/info/default.phtml +2 -2
  32. app/locale/de_CH/Diglin_Ricento.csv +3 -2
  33. app/locale/de_DE/Diglin_Ricento.csv +3 -2
  34. app/locale/en_US/Diglin_Ricento.csv +3 -2
  35. app/locale/fr_FR/Diglin_Ricento.csv +3 -2
  36. lib/Diglin/Ricardo/Managers/Search.php +6 -0
  37. lib/Diglin/Ricardo/Managers/Sell.php +50 -5
  38. lib/Diglin/Ricardo/Managers/Sell/Parameter/ArticleDeliveryParameter.php +4 -0
  39. lib/Diglin/Ricardo/Managers/Sell/Parameter/ArticlePictureParameter.php +30 -1
  40. lib/Diglin/Ricardo/Managers/Sell/Parameter/DeletePlannedArticlesParameter.php +2 -2
  41. lib/Diglin/Ricardo/Services/Search.php +6 -0
  42. lib/Diglin/Ricardo/Services/Sell.php +252 -40
  43. package.xml +18 -5
app/code/community/Diglin/Ricento/.DS_Store CHANGED
Binary file
app/code/community/Diglin/Ricento/Block/.DS_Store CHANGED
Binary file
app/code/community/Diglin/Ricento/Block/Adminhtml/Log/Listing/Grid.php CHANGED
@@ -144,7 +144,7 @@ class Diglin_Ricento_Block_Adminhtml_Log_Listing_Grid extends Mage_Adminhtml_Blo
144
  */
145
  public function addConfigureUrl($value, Varien_Object $row)
146
  {
147
- $url = $this->getUrl('*/products_listing_item/configure', array('id' => $row->getProductsListingId(), 'product' => $row->getProductId()));
148
  return '<a href="' . $url . '">' . $value . '</a>';
149
  }
150
 
144
  */
145
  public function addConfigureUrl($value, Varien_Object $row)
146
  {
147
+ $url = $this->getUrl('*/products_listing_item/configure', array('id' => $row->getProductsListingId(), 'product_id' => $row->getProductId()));
148
  return '<a href="' . $url . '">' . $value . '</a>';
149
  }
150
 
app/code/community/Diglin/Ricento/Block/Adminhtml/Products/Listing/Edit/Renderer/Inventory.php CHANGED
@@ -37,7 +37,7 @@ class Diglin_Ricento_Block_Adminhtml_Products_Listing_Edit_Renderer_Inventory
37
  $inventory = array();
38
  foreach ($itemCollection->getItems() as $item) {
39
  $item->setLoadFallbackOptions(true);
40
- if ($item->getStatus() != Diglin_Ricento_Helper_Data::STATUS_LISTED) {
41
  $qtyInventory = $item->getProductQty();
42
  } else {
43
  $qtyInventory = $item->getQtyInventory();
@@ -53,7 +53,7 @@ class Diglin_Ricento_Block_Adminhtml_Products_Listing_Edit_Renderer_Inventory
53
  } else {
54
  $item = Mage::getModel('diglin_ricento/products_listing_item')->load($row->getItemId());
55
  $item->setLoadFallbackOptions(true);
56
- if ($item->getStatus() != Diglin_Ricento_Helper_Data::STATUS_LISTED) {
57
  $value = $item->getProductQty();
58
  } else {
59
  $value = $item->getQtyInventory();
37
  $inventory = array();
38
  foreach ($itemCollection->getItems() as $item) {
39
  $item->setLoadFallbackOptions(true);
40
+ if (!in_array($item->getStatus(), array(Diglin_Ricento_Helper_Data::STATUS_LISTED, Diglin_Ricento_Helper_Data::STATUS_SOLD))) {
41
  $qtyInventory = $item->getProductQty();
42
  } else {
43
  $qtyInventory = $item->getQtyInventory();
53
  } else {
54
  $item = Mage::getModel('diglin_ricento/products_listing_item')->load($row->getItemId());
55
  $item->setLoadFallbackOptions(true);
56
+ if (!in_array($item->getStatus(), array(Diglin_Ricento_Helper_Data::STATUS_LISTED, Diglin_Ricento_Helper_Data::STATUS_SOLD))) {
57
  $value = $item->getProductQty();
58
  } else {
59
  $value = $item->getQtyInventory();
{lib/Diglin/Ricardo/Enums → app/code/community/Diglin/Ricento/Controller}/.DS_Store RENAMED
Binary file
{lib/Diglin/Ricardo/Managers → app/code/community/Diglin/Ricento/Helper}/.DS_Store RENAMED
Binary file
app/code/community/Diglin/Ricento/Helper/Data.php CHANGED
@@ -780,12 +780,12 @@ class Diglin_Ricento_Helper_Data extends Mage_Core_Helper_Abstract
780
  $startDate = $item->getSalesOptions()->getScheduleDateStart();
781
  }
782
 
783
- if (!is_null($startDate) || $item->getSalesOptions()->getSalesType() == Diglin_Ricento_Model_Config_Source_Sales_Type::AUCTION) {
784
  $startDate = strtotime($startDate);
785
  }
786
 
787
  // ricardo.ch constrains, starting date must be in 1 hour in future
788
- if (is_null($startDate) || $startDate < (time() + 3600)) {
789
  $startDate = time() + 3600;
790
  }
791
 
780
  $startDate = $item->getSalesOptions()->getScheduleDateStart();
781
  }
782
 
783
+ if (!is_null($startDate)) {
784
  $startDate = strtotime($startDate);
785
  }
786
 
787
  // ricardo.ch constrains, starting date must be in 1 hour in future
788
+ if (!is_null($startDate) && $startDate <= time() + 3600) {
789
  $startDate = time() + 3600;
790
  }
791
 
app/code/community/Diglin/Ricento/Helper/Image.php CHANGED
@@ -126,7 +126,7 @@ class Diglin_Ricento_Helper_Image extends Mage_Catalog_Helper_Image
126
  ->keepAspectRatio(true)
127
  ->keepFrame(false)
128
  ->setQuality(90)
129
- ->resize(600)
130
  ->__toString();
131
  }
132
  }
126
  ->keepAspectRatio(true)
127
  ->keepFrame(false)
128
  ->setQuality(90)
129
+ ->resize(600, 600)
130
  ->__toString();
131
  }
132
  }
app/code/community/Diglin/Ricento/Model/.DS_Store ADDED
Binary file
app/code/community/Diglin/Ricento/Model/Api/Services/Sell.php CHANGED
@@ -70,7 +70,7 @@ class Diglin_Ricento_Model_Api_Services_Sell extends Diglin_Ricento_Model_Api_Se
70
  $start = microtime(true);
71
  $insertArticle = $item->getInsertArticleParameter();
72
 
73
- $articleResult = parent::insertArticle($insertArticle);
74
 
75
  if (Mage::helper('diglin_ricento')->isDebugEnabled()) {
76
  Mage::log('Time to insert article ' . (microtime(true) - $start) . ' sec', Zend_Log::DEBUG, Diglin_Ricento_Helper_Data::LOG_FILE);
@@ -104,7 +104,7 @@ class Diglin_Ricento_Model_Api_Services_Sell extends Diglin_Ricento_Model_Api_Se
104
  $start = microtime(true);
105
 
106
  $insertArticlesParameter->setAntiforgeryToken($this->getServiceManager()->getSecurityManager()->getAntiforgeryToken());
107
- $articlesResult = parent::insertArticles($insertArticlesParameter);
108
 
109
  if (Mage::helper('diglin_ricento')->isDebugEnabled()) {
110
  Mage::log('Time to insert the articles ' . (microtime(true) - $start) . ' sec', Zend_Log::DEBUG, Diglin_Ricento_Helper_Data::LOG_FILE, true);
70
  $start = microtime(true);
71
  $insertArticle = $item->getInsertArticleParameter();
72
 
73
+ $articleResult = parent::createArticle($insertArticle);
74
 
75
  if (Mage::helper('diglin_ricento')->isDebugEnabled()) {
76
  Mage::log('Time to insert article ' . (microtime(true) - $start) . ' sec', Zend_Log::DEBUG, Diglin_Ricento_Helper_Data::LOG_FILE);
104
  $start = microtime(true);
105
 
106
  $insertArticlesParameter->setAntiforgeryToken($this->getServiceManager()->getSecurityManager()->getAntiforgeryToken());
107
+ $articlesResult = parent::createArticles($insertArticlesParameter);
108
 
109
  if (Mage::helper('diglin_ricento')->isDebugEnabled()) {
110
  Mage::log('Time to insert the articles ' . (microtime(true) - $start) . ' sec', Zend_Log::DEBUG, Diglin_Ricento_Helper_Data::LOG_FILE, true);
app/code/community/Diglin/Ricento/Model/Config/Source/Sync/Type.php CHANGED
@@ -25,6 +25,7 @@ class Diglin_Ricento_Model_Config_Source_Sync_Type extends Diglin_Ricento_Model_
25
  Diglin_Ricento_Model_Sync_Job::TYPE_CHECK_LIST => $helper->__('Products Check Job'),
26
  Diglin_Ricento_Model_Sync_Job::TYPE_LIST => $helper->__('List Job'),
27
  Diglin_Ricento_Model_Sync_Job::TYPE_STOP => $helper->__('Stop List Job'),
 
28
  Diglin_Ricento_Model_Sync_Job::TYPE_ORDER => $helper->__('Sync Order Job'),
29
  // Diglin_Ricento_Model_Sync_Job::TYPE_SYNCLIST => $helper->__('Sync List Job'), // Hide to user
30
  // Diglin_Ricento_Model_Sync_Job::TYPE_CLOSED => $helper->__('Closed items'), // Hide to user
25
  Diglin_Ricento_Model_Sync_Job::TYPE_CHECK_LIST => $helper->__('Products Check Job'),
26
  Diglin_Ricento_Model_Sync_Job::TYPE_LIST => $helper->__('List Job'),
27
  Diglin_Ricento_Model_Sync_Job::TYPE_STOP => $helper->__('Stop List Job'),
28
+ Diglin_Ricento_Model_Sync_Job::TYPE_TRANSACTION => $helper->__('Sync Transaction Job'),
29
  Diglin_Ricento_Model_Sync_Job::TYPE_ORDER => $helper->__('Sync Order Job'),
30
  // Diglin_Ricento_Model_Sync_Job::TYPE_SYNCLIST => $helper->__('Sync List Job'), // Hide to user
31
  // Diglin_Ricento_Model_Sync_Job::TYPE_CLOSED => $helper->__('Closed items'), // Hide to user
app/code/community/Diglin/Ricento/Model/Cron.php CHANGED
@@ -21,7 +21,8 @@ class Diglin_Ricento_Model_Cron
21
 
22
  protected $_asyncProcess = array(
23
  Diglin_Ricento_Model_Sync_Job::TYPE_SYNCLIST, //** Sync List before getting orders
24
- Diglin_Ricento_Model_Sync_Job::TYPE_ORDER, //** Get new orders
 
25
  Diglin_Ricento_Model_Sync_Job::TYPE_CLOSED //** Close articles which are not anymore open
26
  );
27
 
@@ -39,7 +40,9 @@ class Diglin_Ricento_Model_Cron
39
  ini_set('memory_limit', '512M');
40
  }
41
 
42
- register_shutdown_function(array($this, 'handleError'));
 
 
43
 
44
  try {
45
  foreach ($this->_syncProcess as $jobType) {
@@ -64,7 +67,9 @@ class Diglin_Ricento_Model_Cron
64
  ini_set('memory_limit', '512M');
65
  }
66
 
67
- register_shutdown_function(array($this, 'handleError'));
 
 
68
 
69
  try {
70
  foreach ($this->_asyncProcess as $jobType) {
21
 
22
  protected $_asyncProcess = array(
23
  Diglin_Ricento_Model_Sync_Job::TYPE_SYNCLIST, //** Sync List before getting orders
24
+ Diglin_Ricento_Model_Sync_Job::TYPE_TRANSACTION, //** Get new transactions
25
+ Diglin_Ricento_Model_Sync_Job::TYPE_ORDER, //** Create new orders
26
  Diglin_Ricento_Model_Sync_Job::TYPE_CLOSED //** Close articles which are not anymore open
27
  );
28
 
40
  ini_set('memory_limit', '512M');
41
  }
42
 
43
+ if ($helper->isDebugEnabled()) {
44
+ register_shutdown_function(array($this, 'handleError'));
45
+ }
46
 
47
  try {
48
  foreach ($this->_syncProcess as $jobType) {
67
  ini_set('memory_limit', '512M');
68
  }
69
 
70
+ if ($helper->isDebugEnabled()) {
71
+ register_shutdown_function(array($this, 'handleError'));
72
+ }
73
 
74
  try {
75
  foreach ($this->_asyncProcess as $jobType) {
app/code/community/Diglin/Ricento/Model/Dispatcher/Abstract.php CHANGED
@@ -491,7 +491,7 @@ abstract class Diglin_Ricento_Model_Dispatcher_Abstract
491
 
492
  $articles = $this->_getSellerAccount()->getUnsoldArticles($unsoldArticlesParameter);
493
  if (!is_null($articles) && is_array($articles['UnsoldArticles']) && isset($articles['UnsoldArticles'][0])) {
494
- $article = $this->_getHelper()->extractData($articles[0]);
495
  }
496
 
497
  return $article;
491
 
492
  $articles = $this->_getSellerAccount()->getUnsoldArticles($unsoldArticlesParameter);
493
  if (!is_null($articles) && is_array($articles['UnsoldArticles']) && isset($articles['UnsoldArticles'][0])) {
494
+ $article = $this->_getHelper()->extractData($articles['UnsoldArticles'][0]);
495
  }
496
 
497
  return $article;
app/code/community/Diglin/Ricento/Model/Dispatcher/Closed.php CHANGED
@@ -16,6 +16,7 @@ use \Diglin\Ricardo\Managers\SellerAccount\Parameter\OpenArticlesParameter;
16
  */
17
  class Diglin_Ricento_Model_Dispatcher_Closed extends Diglin_Ricento_Model_Dispatcher_Abstract
18
  {
 
19
  /**
20
  * @var int
21
  */
@@ -103,7 +104,14 @@ class Diglin_Ricento_Model_Dispatcher_Closed extends Diglin_Ricento_Model_Dispat
103
  /**
104
  * Status of the collection must be the same as Diglin_Ricento_Model_Resource_Products_Listing_Item::countReadyTolist
105
  */
106
- $itemCollection = $this->_getItemCollection(array(Diglin_Ricento_Helper_Data::STATUS_LISTED, Diglin_Ricento_Helper_Data::STATUS_SOLD), $this->_currentJobListing->getLastItemId());
 
 
 
 
 
 
 
107
  $itemCollection->addFieldToFilter('is_planned', 0);
108
 
109
  $totalItems = $itemCollection->getSize();
@@ -123,7 +131,7 @@ class Diglin_Ricento_Model_Dispatcher_Closed extends Diglin_Ricento_Model_Dispat
123
  try {
124
  $openArticlesParameter = new OpenArticlesParameter();
125
  $openArticlesParameter
126
- ->setPageSize($this->_limit) // if not defined, default is 10
127
  ->setArticleIdsFilter($ricardoArticleIds);
128
 
129
  $openArticlesResult = $sellerAccountService->getOpenArticles($openArticlesParameter);
@@ -144,21 +152,42 @@ class Diglin_Ricento_Model_Dispatcher_Closed extends Diglin_Ricento_Model_Dispat
144
 
145
  foreach ($itemCollection->getItems() as $item) {
146
 
147
- try {
148
- // Check if the article is really stopped - Article Id may change if product has been sold but reactivated
149
- $openArticlesParameter = new OpenArticlesParameter();
150
- $openArticlesParameter->setInternalReferenceFilter($item->getInternalReference());
151
-
152
- $openArticleResult = $sellerAccountService->getOpenArticles($openArticlesParameter);
153
- } catch (Exception $e) {
154
- $this->_handleException($e);
155
- $e = null;
 
 
 
 
 
 
 
156
  continue;
157
- // keep going for the next item - no break
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  }
159
 
160
  // We do not stop anything if the article ID has just been changed and the product is still open
161
- if (isset($openArticleResult['TotalLines']) && $openArticleResult['TotalLines'] > 0) {
162
  $articleId = $openArticleResult['OpenArticles'][0]['ArticleId'];
163
  if ($item->getRicardoArticleId() != $articleId) {
164
  $item
@@ -166,6 +195,14 @@ class Diglin_Ricento_Model_Dispatcher_Closed extends Diglin_Ricento_Model_Dispat
166
  ->save();
167
  }
168
  } else {
 
 
 
 
 
 
 
 
169
  $item
170
  ->setRicardoArticleId(null)
171
  ->setQtyInventory(null)
@@ -223,4 +260,50 @@ class Diglin_Ricento_Model_Dispatcher_Closed extends Diglin_Ricento_Model_Dispat
223
  }
224
  return $return;
225
  }
226
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  */
17
  class Diglin_Ricento_Model_Dispatcher_Closed extends Diglin_Ricento_Model_Dispatcher_Abstract
18
  {
19
+ const SLEEP_REACTIVATION_TIME = 900; // 15 min in sec
20
  /**
21
  * @var int
22
  */
104
  /**
105
  * Status of the collection must be the same as Diglin_Ricento_Model_Resource_Products_Listing_Item::countReadyTolist
106
  */
107
+ $itemCollection = $this->_getItemCollection(
108
+ array(
109
+ Diglin_Ricento_Helper_Data::STATUS_LISTED,
110
+ Diglin_Ricento_Helper_Data::STATUS_SOLD
111
+ ),
112
+ $this->_currentJobListing->getLastItemId()
113
+ );
114
+
115
  $itemCollection->addFieldToFilter('is_planned', 0);
116
 
117
  $totalItems = $itemCollection->getSize();
131
  try {
132
  $openArticlesParameter = new OpenArticlesParameter();
133
  $openArticlesParameter
134
+ ->setPageSize($this->_limit) // if not defined, default is 10, currently is 200
135
  ->setArticleIdsFilter($ricardoArticleIds);
136
 
137
  $openArticlesResult = $sellerAccountService->getOpenArticles($openArticlesParameter);
152
 
153
  foreach ($itemCollection->getItems() as $item) {
154
 
155
+ /**
156
+ * Close Articles when:
157
+ * - sales option "until sold" is enabled + qty_inventory < 1
158
+ * - number of reactivation has been reached (date published * number_reaction * duration in days) - not implemented here
159
+ * - all is sold
160
+ * - Not found as openArticle (cause of manual stop on ricardo side or due to a moment where the reactivation break openArticle )
161
+ *
162
+ * Warning: article ID may change between reactivation (e.g. if some articles are sold), there is also a phase where articles in reactivation
163
+ * are not visible in getOpenArticles
164
+ */
165
+
166
+ $stopIt = false;
167
+ if ($item->getQtyInventory() <= 0) {
168
+ $stopIt = true;
169
+ } else if ($item->getSalesOptions()->getScheduleReactivation() == Diglin_Ricento_Model_Config_Source_Sales_Reactivation::SOLDOUT
170
+ && $item->getQtyInventory() > 0) { // drawback with this solution: manual stop on ricardo side are not took in account
171
  continue;
172
+ }
173
+
174
+ if (!$stopIt) {
175
+ try {
176
+ // Check if the article is really stopped - Article Id may change if product has been sold but reactivated
177
+ $openArticlesParameter = new OpenArticlesParameter();
178
+ $openArticlesParameter->setInternalReferenceFilter($item->getInternalReference());
179
+
180
+ $openArticleResult = $sellerAccountService->getOpenArticles($openArticlesParameter);
181
+ } catch (Exception $e) {
182
+ $this->_handleException($e);
183
+ $e = null;
184
+ continue;
185
+ // keep going for the next item - no break
186
+ }
187
  }
188
 
189
  // We do not stop anything if the article ID has just been changed and the product is still open
190
+ if (!$stopIt && isset($openArticleResult['TotalLines']) && $openArticleResult['TotalLines'] > 0) {
191
  $articleId = $openArticleResult['OpenArticles'][0]['ArticleId'];
192
  if ($item->getRicardoArticleId() != $articleId) {
193
  $item
195
  ->save();
196
  }
197
  } else {
198
+ /**
199
+ * Wait before to stop in case the product is in reactivation phase on ricardo side
200
+ * GetOpenArticle may returned something after a period of time
201
+ */
202
+ if ($this->temporizeReactivationPhase($item)) {
203
+ continue;
204
+ }
205
+
206
  $item
207
  ->setRicardoArticleId(null)
208
  ->setQtyInventory(null)
260
  }
261
  return $return;
262
  }
263
+
264
+ /**
265
+ * Workaround to "sleep" a product which can be in reactivation phase before to stop it definitely if really needed
266
+ *
267
+ * @param Diglin_Ricento_Model_Products_Listing_Item $item
268
+ * @return bool
269
+ */
270
+ public function temporizeReactivationPhase(Diglin_Ricento_Model_Products_Listing_Item $item)
271
+ {
272
+ $temporizeReactivationPhase = true;
273
+ $found = false;
274
+
275
+ $reactivationFile = Mage::getBaseDir('tmp') . DS . 'ricardo_reactivation.json';
276
+
277
+ if (!file_exists($reactivationFile)) {
278
+ file_put_contents($reactivationFile, '');
279
+ chmod($reactivationFile, 0777);
280
+ }
281
+
282
+ $reactivationElements = (array) json_decode(file_get_contents($reactivationFile), true);
283
+
284
+ foreach ($reactivationElements as $key => $reactivationElement) {
285
+ if ($reactivationElement['internal_reference'] == $item->getInternalReference()) {
286
+ $found = true;
287
+
288
+ if ($reactivationElement['temporary_reactivation_time'] + self::SLEEP_REACTIVATION_TIME < time()) {
289
+ $temporizeReactivationPhase = false;
290
+ }
291
+
292
+ if ($found && !$temporizeReactivationPhase) {
293
+ unset($reactivationElements[$key]);
294
+ }
295
+ }
296
+ }
297
+
298
+ if (!$found) {
299
+ $reactivationElements[] = array(
300
+ 'internal_reference' => $item->getInternalReference(),
301
+ 'temporary_reactivation_time' => time()
302
+ );
303
+ }
304
+
305
+ file_put_contents($reactivationFile, json_encode($reactivationElements));
306
+
307
+ return $temporizeReactivationPhase;
308
+ }
309
+ }
app/code/community/Diglin/Ricento/Model/Dispatcher/Order.php CHANGED
@@ -9,8 +9,6 @@
9
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
10
  */
11
 
12
- use \Diglin\Ricardo\Managers\SellerAccount\Parameter\SoldArticlesParameter;
13
-
14
  /**
15
  * Class Diglin_Ricento_Model_Dispatcher_Order
16
  */
@@ -26,454 +24,50 @@ class Diglin_Ricento_Model_Dispatcher_Order extends Diglin_Ricento_Model_Dispatc
26
  */
27
  protected $_jobType = Diglin_Ricento_Model_Sync_Job::TYPE_ORDER;
28
 
29
- /**
30
- * Create Order Jobs for all products listing with the listed status
31
- *
32
- * @return $this
33
- */
34
- public function proceed()
35
- {
36
- $plResource = Mage::getResourceModel('diglin_ricento/products_listing');
37
- $readConnection = $plResource->getReadConnection();
38
- $select = $readConnection
39
- ->select()
40
- ->from($plResource->getTable('diglin_ricento/products_listing'), 'entity_id');
41
-
42
- $listingIds = $readConnection->fetchCol($select);
43
-
44
- foreach ($listingIds as $listingId) {
45
- $select = $readConnection
46
- ->select()
47
- ->from(array('pli' => $plResource->getTable('diglin_ricento/products_listing_item')), 'item_id')
48
- ->where('type <> ?', Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)
49
- ->where('products_listing_id = :id AND is_planned = 0')
50
- ->where('status IN (?)', array(Diglin_Ricento_Helper_Data::STATUS_LISTED, Diglin_Ricento_Helper_Data::STATUS_SOLD));
51
-
52
- $binds = array('id' => $listingId);
53
- $countListedItems = count($readConnection->fetchAll($select, $binds));
54
-
55
- if ($countListedItems == 0) {
56
- continue;
57
- }
58
-
59
- /**
60
- * Check that there is not already running job instead of creating a new one
61
- */
62
- Mage::getResourceModel('diglin_ricento/sync_job')->cleanupPendingJob($this->_jobType, $listingId);
63
-
64
- // pending progress doesn't make sense here as we cleanup before but keep it to be sure everything ok
65
- $job = Mage::getModel('diglin_ricento/sync_job');
66
- $job->loadByTypeListingIdProgress($this->_jobType, $listingId, array(
67
- Diglin_Ricento_Model_Sync_Job::PROGRESS_PENDING,
68
- Diglin_Ricento_Model_Sync_Job::PROGRESS_CHUNK_RUNNING
69
- ));
70
-
71
- if ($job->getId()) {
72
- continue;
73
- }
74
-
75
- $job
76
- ->setJobType($this->_jobType)
77
- ->setProgress(Diglin_Ricento_Model_Sync_Job::PROGRESS_PENDING)
78
- ->setJobMessage(array($job->getJobMessage(true)))
79
- ->save();
80
-
81
- $jobListing = Mage::getModel('diglin_ricento/sync_job_listing');
82
- $jobListing
83
- ->setProductsListingId($listingId)
84
- ->setTotalCount($countListedItems)
85
- ->setTotalProceed(0)
86
- ->setJobId($job->getId())
87
- ->save();
88
- }
89
-
90
- unset($listingIds);
91
- unset($readConnection);
92
- unset($job);
93
- unset($jobListing);
94
-
95
- return parent::proceed();
96
- }
97
-
98
  /**
99
  * @return $this|mixed
100
  */
101
- protected function _proceed()
102
- {
103
- $article = null;
104
- $soldArticles = array();
105
-
106
- $itemCollection = $this->_getItemCollection(array(Diglin_Ricento_Helper_Data::STATUS_LISTED, Diglin_Ricento_Helper_Data::STATUS_SOLD), $this->_currentJobListing->getLastItemId());
107
- $itemCollection->addFieldToFilter('is_planned', 0);
108
-
109
- $ricardoArticleIds = $itemCollection->getColumnValues('ricardo_article_id');
110
- $lastItem = $itemCollection->getLastItem();
111
-
112
- try {
113
- $soldArticles = $this->getSoldArticles($ricardoArticleIds);
114
- } catch (Exception $e) {
115
- $this->_handleException($e, Mage::getSingleton('diglin_ricento/api_services_selleraccount'));
116
- $e = null;
117
- // keep going - no break
118
- }
119
-
120
- /* @var $item Diglin_Ricento_Model_Products_Listing_Item */
121
- foreach ($soldArticles as $soldArticle) {
122
- /**
123
- * Save item information and eventual error messages
124
- */
125
- if (isset($soldArticle['item_message'])) {
126
- $this->_getListingLog()->saveLog(array(
127
- 'job_id' => $this->_currentJob->getId(),
128
- 'product_title' => $soldArticle['product_title'],
129
- 'product_id' => $soldArticle['product_id'],
130
- 'products_listing_id' => $this->_productsListingId,
131
- 'message' => (is_array($soldArticle['item_message'])) ? $this->_jsonEncode($soldArticle['item_message']) : $soldArticle['item_message'],
132
- 'log_status' => $soldArticle['item_status'],
133
- 'log_type' => $this->_logType,
134
- 'created_at' => Mage::getSingleton('core/date')->gmtDate()
135
- ));
136
- }
137
- }
138
-
139
- /**
140
- * Save the current information of the process to allow live display via ajax call
141
- */
142
- $this->_totalProceed += count($ricardoArticleIds);
143
- $this->_currentJobListing->saveCurrentJob(array(
144
- 'total_proceed' => $this->_totalProceed,
145
- 'last_item_id' => $lastItem->getId()
146
- ));
147
-
148
- unset($itemCollection);
149
-
150
- return $this;
151
- }
152
-
153
- /**
154
- * @param array $articleIds
155
- * @return array
156
- */
157
- private function _getSoldArticlesList(array $articleIds)
158
- {
159
- $soldArticlesParameter = new SoldArticlesParameter();
160
- $delay = (3 * 24 * 60 * 60); // 3 days
161
-
162
- $transactionCollection = Mage::getResourceModel('diglin_ricento/sales_transaction_collection');
163
- $transactionCollection
164
- ->addFieldToFilter('order_id', new Zend_Db_Expr('NULL'))
165
- ->getSelect()
166
- ->where('UNIX_TIMESTAMP(created_at) + (?) < UNIX_TIMESTAMP(now())', $delay);
167
-
168
- /**
169
- * Set minimum end date to filter e.g. last day. Do not use a higher value as the minimum sales duration is 1 day,
170
- * we prevent to have conflict with several sold articles having similar internal reference
171
- */
172
- $soldArticlesParameter
173
- ->setPageSize($this->_limit) // if not defined, default is 10
174
- ->setArticleIdsFilter($articleIds)
175
- ->setExcludedTransactionIdsFilter($transactionCollection->getColumnValues('transaction_id'))
176
- ->setMinimumEndDate($this->_getHelper()->getJsonDate(time() - $delay));
177
-
178
- $sellerAccountService = Mage::getSingleton('diglin_ricento/api_services_selleraccount')->setCanUseCache(false);
179
- $sellerAccountService->setCurrentWebsite($this->_getListing()->getWebsiteId());
180
-
181
- $soldArticlesResult = $sellerAccountService->getSoldArticles($soldArticlesParameter);
182
-
183
- return array_reverse($soldArticlesResult['SoldArticles']);
184
- }
185
-
186
- /**
187
- * @param array $articleIds
188
- * @param Diglin_Ricento_Model_Products_Listing_Item $productItem
189
- * @return bool
190
- * @throws Exception
191
- */
192
- public function getSoldArticles($articleIds = array(), Diglin_Ricento_Model_Products_Listing_Item $productItem = null)
193
- {
194
- $soldArticlesReturn = array();
195
-
196
- foreach ($this->_getSoldArticlesList($articleIds) as $soldArticle) {
197
-
198
- $rawData = $soldArticle;
199
- $soldArticle = $this->_getHelper()->extractData($soldArticle);
200
- $transaction = $soldArticle->getTransaction();
201
-
202
- if ($transaction && count($transaction) > 0) {
203
-
204
- /**
205
- * 1. Check that the transaction doesn't already exists
206
- */
207
- if (Mage::getResourceModel('diglin_ricento/sales_transaction_collection')
208
- ->addFieldToFilter('bid_id', $transaction->getBidId())->getSize()
209
- ) {
210
- continue;
211
- }
212
-
213
- /**
214
- * 2. Check if the products listing item exists and is listed
215
- */
216
- $references = $soldArticle->getArticleInternalReferences();
217
- if (!isset($references[0]['InternalReferenceValue'])) {
218
- continue;
219
- }
220
-
221
- $extractedInternReference = $this->_getHelper()->extractInternalReference($references[0]['InternalReferenceValue']);
222
- if (!($extractedInternReference instanceof Varien_Object)) {
223
- continue;
224
- }
225
-
226
- if (is_null($productItem) || $productItem->getId() != $extractedInternReference->getItemId()) {
227
- $productItem = Mage::getModel('diglin_ricento/products_listing_item')->load($extractedInternReference->getItemId());
228
- $productItem->setLoadFallbackOptions(true);
229
- }
230
-
231
- if (!$productItem->getId() || (!in_array($productItem->getStatus(), array(Diglin_Ricento_Helper_Data::STATUS_LISTED, Diglin_Ricento_Helper_Data::STATUS_SOLD)))) {
232
- continue;
233
- }
234
-
235
- /**
236
- * 3. Create customer if not exist and set his default billing address
237
- */
238
- $customer = $this->getCustomerFromTransaction($transaction->getBuyer(), $this->_getListing()->getWebsiteId());
239
-
240
- if ($customer) {
241
- $address = $this->getBillingAddress($customer, $transaction);
242
- } else {
243
- Mage::log($transaction->getBuyer(), Zend_Log::ERR, Diglin_Ricento_Helper_Data::LOG_FILE, true);
244
- throw new Exception($this->_getHelper()->__('Customer creation failed! ricardo.ch transaction cannot be added.'));
245
- }
246
-
247
- /**
248
- * 4. Insert transaction into DB for future use
249
- */
250
- $salesTransaction = $this->saveTransaction($transaction, $customer, $address, $soldArticle, $productItem, $rawData);
251
-
252
- /**
253
- * 5. Decrease the quantity at products listing item level and stop it if needed
254
- */
255
- $productItem
256
- ->setQtyInventory($productItem->getQtyInventory() - $salesTransaction->getQty())
257
- ->setStatus(Diglin_Ricento_Helper_Data::STATUS_SOLD)
258
- ->save();
259
-
260
- if (!isset($soldArticlesReturn[$productItem->getId()])) {
261
- $soldArticlesReturn[$productItem->getId()] = array(
262
- 'item_id' => $productItem->getId(),
263
- 'product_title' => $productItem->getProductTitle(),
264
- 'product_id' => $productItem->getProductId(),
265
- 'item_message' => array('success' => $this->_getHelper()->__('The product has been sold')),
266
- 'item_status' => Diglin_Ricento_Model_Products_Listing_Log::STATUS_SUCCESS
267
- );
268
- }
269
- }
270
- }
271
-
272
- unset($salesTransaction);
273
- unset($soldArticlesParameter);
274
- unset($sellerAccountService);
275
- unset($soldArticles);
276
- unset($productItem);
277
- unset($customer);
278
-
279
- return $soldArticlesReturn;
280
- }
281
-
282
- /**
283
- * Find or create customer if needed based on ricardo data
284
- *
285
- * @param Varien_Object $buyer
286
- * @param int $websiteId
287
- * @return bool|Mage_Customer_Model_Customer
288
- */
289
- public function getCustomerFromTransaction(Varien_Object $buyer, $websiteId = Mage_Core_Model_App::ADMIN_STORE_ID)
290
- {
291
- if (!$buyer->getBuyerId()) {
292
- return false;
293
- }
294
-
295
- $store = $this->getStoreFromWebsite($websiteId);
296
-
297
- /* @var $customer Mage_Customer_Model_Customer */
298
- $customer = Mage::getModel('customer/customer')
299
- ->setWebsiteId($websiteId)
300
- ->loadByEmail($buyer->getEmail());
301
-
302
- if (!$customer->getId()) {
303
- $customer
304
- ->setFirstname($buyer->getFirstName())
305
- ->setLastname($buyer->getLastName())
306
- ->setEmail($buyer->getEmail())
307
- ->setPassword($customer->generatePassword())
308
- ->setStoreId($store->getId())
309
- ->setWebsiteId($websiteId)
310
- ->setConfirmation(null);
311
- }
312
-
313
- if (!$customer->getRicardoId()) {
314
- $customer
315
- ->setRicardoId($buyer->getBuyerId())
316
- ->setRicardoUsername($buyer->getNickName());
317
- }
318
-
319
- $customer->save();
320
-
321
- Mage::app()->getLocale()->emulate($store->getId());
322
-
323
- if ($customer->isObjectNew() && Mage::getStoreConfigFlag(Diglin_Ricento_Helper_Data::CFG_ACCOUNT_CREATION_EMAIL, $store->getId())) {
324
- if ($customer->isConfirmationRequired()) {
325
- $typeEmail = 'confirmation';
326
- } else {
327
- $typeEmail = 'registered';
328
- }
329
- $customer->sendNewAccountEmail($typeEmail, '', $store->getId());
330
- }
331
-
332
- Mage::app()->getLocale()->revert();
333
-
334
- return $customer;
335
- }
336
-
337
- /**
338
- * @param Mage_Customer_Model_Customer $customer
339
- * @param $transaction
340
- * @return Mage_Customer_Model_Address
341
- * @throws Exception
342
- */
343
- public function getBillingAddress(Mage_Customer_Model_Customer $customer, $transaction)
344
- {
345
- $buyerAddress = $transaction->getBuyer()->getAddresses();
346
-
347
- $address = $customer->getDefaultBillingAddress();
348
-
349
- $street = $buyerAddress->getAddress1() . ' ' . $buyerAddress->getStreetNumber()
350
- . (($buyerAddress->getAddress2()) ? "\n" . $buyerAddress->getAddress2() : '')
351
- . (($buyerAddress->getPostalBox()) ? "\n" . $buyerAddress->getPostalBox() : '');
352
-
353
- $postCode = $buyerAddress->getZipCode();
354
- $city = $buyerAddress->getCity();
355
-
356
- if (!$address || ($address->getCity() != $city && $address->getPostcode() != $postCode && $address->getStreet() != $street)) {
357
-
358
- /**
359
- * Ricardo API doesn't provide the region and Magento 1.6 doesn't allow to make region optional
360
- * We use the first region found for the current country but it's far to be good
361
- * @todo add a "other" region into each country having required region
362
- */
363
- $countryId = $this->getCountryId($buyerAddress->getCountry());
364
- $regionId = null;
365
- if (Mage::helper('directory')->isRegionRequired($countryId)) {
366
- $regionId = Mage::getModel('directory/region')->getCollection()
367
- ->addFieldToFilter('country_id', $countryId)
368
- ->getFirstItem()
369
- ->getId();
370
- }
371
-
372
- $phone = ($transaction->getBuyer()->getPhone()) ? $transaction->getBuyer()->getPhone() : $transaction->getBuyer()->getMobile();
373
-
374
- $address = Mage::getModel('customer/address');
375
- $address
376
- ->setCustomerId($customer->getId())
377
- ->setCompany($transaction->getBuyer()->getCompanyName())
378
- ->setLastname($customer->getLastname())
379
- ->setFirstname($customer->getFirstname())
380
- ->setStreet($street)
381
- ->setPostcode($postCode)
382
- ->setCity($city)
383
- ->setRegionId($regionId)
384
- ->setCountryId($countryId)
385
- ->setTelephone($phone)
386
- ->setIsDefaultBilling(true)
387
- ->setIsDefaultShipping(true)
388
- ->setSaveInAddressBook(1)
389
- ->save();
390
-
391
- $customer->addAddress($address);
392
- }
393
-
394
- return $address;
395
- }
396
-
397
- /**
398
- * @param $transaction
399
- * @param Mage_Customer_Model_Customer $customer
400
- * @param $address
401
- * @param $soldArticle
402
- * @param Diglin_Ricento_Model_Products_Listing_Item $productItem
403
- * @param $rawData
404
- * @return Diglin_Ricento_Model_Sales_Transaction
405
- * @throws Exception
406
- */
407
- public function saveTransaction(
408
- $transaction,
409
- Mage_Customer_Model_Customer $customer,
410
- Mage_Customer_Model_Address $address,
411
- $soldArticle,
412
- Diglin_Ricento_Model_Products_Listing_Item $productItem,
413
- $rawData
414
- ) {
415
- $lang = $this->_getHelper()->getLocalCodeFromRicardoLanguageId($soldArticle->getMainLanguageId());
416
- $transactionData = array(
417
- 'bid_id' => $transaction->getBidId(),
418
- 'website_id' => $this->_getListing()->getWebsiteId(),
419
- 'customer_id' => $customer->getId(),
420
- 'address_id' => $address->getId(),
421
- 'ricardo_customer_id' => $customer->getRicardoId(),
422
- 'ricardo_article_id' => $soldArticle->getArticleId(),
423
- 'qty' => $transaction->getBuyerQuantity(),
424
- 'view_count' => $soldArticle->getViewCount(),
425
- 'shipping_fee' => $soldArticle->getDeliveryCost(),
426
- 'shipping_text' => $soldArticle->getDeliveryText(), // @fixme - if bought in FR and the API use the DE key, text will in DE. I have no solution now
427
- 'shipping_method' => $soldArticle->getDeliveryId(),
428
- 'shipping_cumulative_fee' => (int)$soldArticle->getIsCumulativeShipping(),
429
- 'language_id' => $soldArticle->getMainLanguageId(),
430
- 'payment_methods' => implode(',', $soldArticle->getPaymentMethodIds()->getData()),
431
- 'shipping_description' => $productItem->getShippingPaymentRule()->getShippingDescription($lang),
432
- 'payment_description' => $productItem->getShippingPaymentRule()->getPaymentDescription($lang),
433
- 'total_bid_price' => $soldArticle->getWinningBidPrice(),
434
- 'product_id' => $productItem->getProductId(),
435
- 'raw_data' => Mage::helper('core')->jsonEncode($rawData),
436
- 'sold_at' => $this->_getHelper()->getJsonTimestamp($soldArticle->getEndDate())
437
- );
438
-
439
- $salesTransaction = Mage::getModel('diglin_ricento/sales_transaction')
440
- ->addData($transactionData)
441
- ->save();
442
-
443
- return $salesTransaction;
444
- }
445
-
446
- /**
447
- * Create new orders for transactions done more than 30 min in past (depends on the extension configuration)
448
- *
449
- * @return $this
450
- */
451
- protected function _proceedAfter()
452
  {
453
- $customerTransactions = array();
454
  $mergeOrder = Mage::getStoreConfigFlag(Diglin_Ricento_Helper_Data::CFG_MERGE_ORDER);
455
 
456
- $delay = ($mergeOrder) ? 30 : 0;
457
 
458
  /**
459
- * Get transaction older than 30 or 1 minutes and when no order was created
460
  * Those will be merged in one order if the customer is the same
461
  */
462
  $transactionCollection = Mage::getResourceModel('diglin_ricento/sales_transaction_collection');
463
  $transactionCollection
464
  ->getSelect()
465
- ->where('order_id IS NULL')
466
- ->where('UNIX_TIMESTAMP(sold_at) + ( ? * 60) < UNIX_TIMESTAMP(now())', (int) $delay); // 30 or 0 min past
 
 
 
467
 
468
  $inc = 0;
469
  foreach ($transactionCollection->getItems() as $transactionItem) {
470
  if ($mergeOrder) {
 
471
  $customerTransactions[$transactionItem->getCustomerId()][] = $transactionItem;
 
472
  } else {
473
  $customerTransactions[++$inc] = $transactionItem;
474
  }
475
  }
476
 
 
 
 
 
 
 
 
 
 
 
477
  /**
478
  * Create new order for each customer
479
  */
@@ -486,19 +80,20 @@ class Diglin_Ricento_Model_Dispatcher_Order extends Diglin_Ricento_Model_Dispatc
486
  }
487
  }
488
 
489
- /**
490
- * Stop the list if all products listing items are stopped
491
- */
492
- if ($this->_productsListingId) {
493
- Mage::getResourceModel('diglin_ricento/products_listing')->setStatusStop($this->_productsListingId);
494
- }
495
-
496
  unset($transactionCollection);
497
  unset($customerTransactions);
498
 
499
  return $this;
500
  }
501
 
 
 
 
 
 
 
 
 
502
  /**
503
  * If a customer ordered several articles of the same seller in a short period of time
504
  * the order will merge all articles.
@@ -508,7 +103,7 @@ class Diglin_Ricento_Model_Dispatcher_Order extends Diglin_Ricento_Model_Dispatc
508
  public function createNewOrder($transactions)
509
  {
510
  $store = $quote = null;
511
- $dispatchedTransactions = array();
512
  $shippingTransactionMethod = $shippingMethodFee = $highestShippingFee = 0;
513
  $shippingText = $shippingDescription = '';
514
 
@@ -534,6 +129,7 @@ class Diglin_Ricento_Model_Dispatcher_Order extends Diglin_Ricento_Model_Dispatc
534
  $shippingDescription = $transaction->getShippingDescription();
535
 
536
  $dispatchedTransactions[$transaction->getBidId()] = $transaction->getId();
 
537
  }
538
 
539
  if ($quote && $store) {
@@ -543,7 +139,7 @@ class Diglin_Ricento_Model_Dispatcher_Order extends Diglin_Ricento_Model_Dispatc
543
  ->setRicardoShippingDescription($shippingText . "\n" . $shippingDescription)
544
  ->setRicardoShippingMethod($shippingTransactionMethod);
545
 
546
- $this->prepareQuote($quote, $dispatchedTransactions, $transaction->getPaymentMethods());
547
 
548
  if ($quote->getId()) {
549
  $orderCreateModel = $this->getOrderCreateModel();
@@ -630,6 +226,7 @@ class Diglin_Ricento_Model_Dispatcher_Order extends Diglin_Ricento_Model_Dispatc
630
 
631
  $quote = Mage::getModel('sales/quote');
632
  $quote
 
633
  ->setStoreId($store->getId())
634
  ->assignCustomerWithAddressChange($customer, $quoteAddress, $quoteAddress);
635
 
@@ -716,7 +313,7 @@ class Diglin_Ricento_Model_Dispatcher_Order extends Diglin_Ricento_Model_Dispatc
716
  * @param $paymentMethods
717
  * @return Mage_Sales_Model_Quote
718
  */
719
- public function prepareQuote(Mage_Sales_Model_Quote $quote, array $dispatchedTransactions, $paymentMethods)
720
  {
721
  $shippingTransactionMethod = $this->_getHelper()
722
  ->getRicardoShippingRegistry()
@@ -744,6 +341,7 @@ class Diglin_Ricento_Model_Dispatcher_Order extends Diglin_Ricento_Model_Dispatc
744
  'ricardo_payment_methods' => $paymentMethods,
745
  'ricardo_transaction_ids' => implode(',', $dispatchedTransactions),
746
  'ricardo_bid_ids' => implode(',', array_keys($dispatchedTransactions)),
 
747
  )
748
  )
749
  )
@@ -762,17 +360,6 @@ class Diglin_Ricento_Model_Dispatcher_Order extends Diglin_Ricento_Model_Dispatc
762
  return $quote;
763
  }
764
 
765
- /**
766
- * Retrieve session object
767
- *
768
- * @deprecated
769
- * @return Mage_Adminhtml_Model_Session_Quote
770
- */
771
- public function getSession()
772
- {
773
- return Mage::getSingleton('adminhtml/session_quote');
774
- }
775
-
776
  /**
777
  * Retrieve order create model
778
  *
@@ -783,59 +370,6 @@ class Diglin_Ricento_Model_Dispatcher_Order extends Diglin_Ricento_Model_Dispatc
783
  return Mage::getSingleton('diglin_ricento/sales_order_create');
784
  }
785
 
786
- /**
787
- * @param $countryRicardoId
788
- * @return string
789
- * @throws Exception
790
- */
791
- public function getCountryId($countryRicardoId)
792
- {
793
- $countryName = '';
794
- $countries = Mage::getSingleton('diglin_ricento/api_services_system')
795
- ->setCurrentWebsite($this->_getListing()->getWebsiteId())
796
- ->getCountries();
797
-
798
- foreach ($countries as $country) {
799
- if ($country['CountryId'] == $countryRicardoId) {
800
- $countryName = $country['CountryName'];
801
- break;
802
- }
803
- }
804
-
805
- $code = $this->translateCountryNameToCode($countryName);
806
- if (!$code) {
807
- throw new Exception(Mage::helper('diglin_ricento')->__('Country Code is not available. Please contact the author of this extension or support.'));
808
- }
809
- $directory = Mage::getModel('directory/country')->loadByCode($code);
810
- return $directory->getCountryId();
811
- }
812
-
813
- /**
814
- * VERY TEMPORARY SOLUTION until ricardo provide an API method to get the correct value
815
- * @todo remove it as soon the API has implemented the method to get it
816
- *
817
- * @param $countryName
818
- * @return string
819
- */
820
- public function translateCountryNameToCode($countryName)
821
- {
822
- $countryCode = array(
823
- 'Schweiz' => 'CH',
824
- 'Suisse' => 'CH',
825
- 'Liechtenstein' => 'LI', // ok for both lang
826
- 'Österreich' => 'AT',
827
- 'Autriche' => 'AT',
828
- 'Deutschland' => 'DE',
829
- 'Allemagne' => 'DE',
830
- 'Frankreich' => 'FR',
831
- 'France' => 'FR',
832
- 'Italien' => 'IT',
833
- 'Italie' => 'IT',
834
- );
835
-
836
- return (isset($countryCode[$countryName])) ? $countryCode[$countryName] : false;
837
- }
838
-
839
  /**
840
  * @param int $websiteId
841
  * @return Mage_Core_Model_Store
9
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
10
  */
11
 
 
 
12
  /**
13
  * Class Diglin_Ricento_Model_Dispatcher_Order
14
  */
24
  */
25
  protected $_jobType = Diglin_Ricento_Model_Sync_Job::TYPE_ORDER;
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  /**
28
  * @return $this|mixed
29
  */
30
+ public function proceed()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  {
32
+ $customerTransactions = $timestampTransactions = array();
33
  $mergeOrder = Mage::getStoreConfigFlag(Diglin_Ricento_Helper_Data::CFG_MERGE_ORDER);
34
 
35
+ $delay = (($mergeOrder) ? 30 : 0) * 60;
36
 
37
  /**
38
+ * Get transaction older than 30 or 0 minutes and when no order was created
39
  * Those will be merged in one order if the customer is the same
40
  */
41
  $transactionCollection = Mage::getResourceModel('diglin_ricento/sales_transaction_collection');
42
  $transactionCollection
43
  ->getSelect()
44
+ ->where('order_id IS NULL');
45
+
46
+ if (!$transactionCollection->getSize()) {
47
+ return $this;
48
+ }
49
 
50
  $inc = 0;
51
  foreach ($transactionCollection->getItems() as $transactionItem) {
52
  if ($mergeOrder) {
53
+ $timestampTransactions[$transactionItem->getCustomerId()][] = strtotime($transactionItem->getSoldAt());
54
  $customerTransactions[$transactionItem->getCustomerId()][] = $transactionItem;
55
+ array_multisort($timestampTransactions[$transactionItem->getCustomerId()], SORT_ASC, SORT_NUMERIC);
56
  } else {
57
  $customerTransactions[++$inc] = $transactionItem;
58
  }
59
  }
60
 
61
+ if ($mergeOrder && count($customerTransactions)) {
62
+ foreach ($timestampTransactions as $customerId => $timestampTransaction) {
63
+ $qtyTransactions = count($timestampTransaction);
64
+ // do not create order for transactions which may need to be merged
65
+ if ($timestampTransaction[$qtyTransactions - 1] + $delay > time()) {
66
+ unset($customerTransactions[$customerId]);
67
+ }
68
+ }
69
+ }
70
+
71
  /**
72
  * Create new order for each customer
73
  */
80
  }
81
  }
82
 
 
 
 
 
 
 
 
83
  unset($transactionCollection);
84
  unset($customerTransactions);
85
 
86
  return $this;
87
  }
88
 
89
+ /**
90
+ * @return $this
91
+ */
92
+ protected function _proceed()
93
+ {
94
+ return $this;
95
+ }
96
+
97
  /**
98
  * If a customer ordered several articles of the same seller in a short period of time
99
  * the order will merge all articles.
103
  public function createNewOrder($transactions)
104
  {
105
  $store = $quote = null;
106
+ $dispatchedTransactions = $articleIds = array();
107
  $shippingTransactionMethod = $shippingMethodFee = $highestShippingFee = 0;
108
  $shippingText = $shippingDescription = '';
109
 
129
  $shippingDescription = $transaction->getShippingDescription();
130
 
131
  $dispatchedTransactions[$transaction->getBidId()] = $transaction->getId();
132
+ $articleIds[] = $transaction->getRicardoArticleId();
133
  }
134
 
135
  if ($quote && $store) {
139
  ->setRicardoShippingDescription($shippingText . "\n" . $shippingDescription)
140
  ->setRicardoShippingMethod($shippingTransactionMethod);
141
 
142
+ $this->prepareQuote($quote, $dispatchedTransactions, $transaction->getPaymentMethods(), $articleIds);
143
 
144
  if ($quote->getId()) {
145
  $orderCreateModel = $this->getOrderCreateModel();
226
 
227
  $quote = Mage::getModel('sales/quote');
228
  $quote
229
+ ->setIsSuperMode(true) // quote without restriction
230
  ->setStoreId($store->getId())
231
  ->assignCustomerWithAddressChange($customer, $quoteAddress, $quoteAddress);
232
 
313
  * @param $paymentMethods
314
  * @return Mage_Sales_Model_Quote
315
  */
316
+ public function prepareQuote(Mage_Sales_Model_Quote $quote, array $dispatchedTransactions, $paymentMethods, $articleIds)
317
  {
318
  $shippingTransactionMethod = $this->_getHelper()
319
  ->getRicardoShippingRegistry()
341
  'ricardo_payment_methods' => $paymentMethods,
342
  'ricardo_transaction_ids' => implode(',', $dispatchedTransactions),
343
  'ricardo_bid_ids' => implode(',', array_keys($dispatchedTransactions)),
344
+ 'ricardo_article_ids' => implode(',', $articleIds)
345
  )
346
  )
347
  )
360
  return $quote;
361
  }
362
 
 
 
 
 
 
 
 
 
 
 
 
363
  /**
364
  * Retrieve order create model
365
  *
370
  return Mage::getSingleton('diglin_ricento/sales_order_create');
371
  }
372
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
  /**
374
  * @param int $websiteId
375
  * @return Mage_Core_Model_Store
app/code/community/Diglin/Ricento/Model/Dispatcher/Stop.php CHANGED
@@ -50,6 +50,7 @@ class Diglin_Ricento_Model_Dispatcher_Stop extends Diglin_Ricento_Model_Dispatch
50
  // Get new orders before to stop - @todo sync and get order only from the current list
51
  $dispatcher = Mage::getSingleton('diglin_ricento/dispatcher');
52
  $dispatcher->dispatch(Diglin_Ricento_Model_Sync_Job::TYPE_SYNCLIST)->proceed();
 
53
  $dispatcher->dispatch(Diglin_Ricento_Model_Sync_Job::TYPE_ORDER)->proceed();
54
 
55
  $sell = Mage::getSingleton('diglin_ricento/api_services_sell');
50
  // Get new orders before to stop - @todo sync and get order only from the current list
51
  $dispatcher = Mage::getSingleton('diglin_ricento/dispatcher');
52
  $dispatcher->dispatch(Diglin_Ricento_Model_Sync_Job::TYPE_SYNCLIST)->proceed();
53
+ $dispatcher->dispatch(Diglin_Ricento_Model_Sync_Job::TYPE_TRANSACTION)->proceed();
54
  $dispatcher->dispatch(Diglin_Ricento_Model_Sync_Job::TYPE_ORDER)->proceed();
55
 
56
  $sell = Mage::getSingleton('diglin_ricento/api_services_sell');
app/code/community/Diglin/Ricento/Model/Dispatcher/Transaction.php ADDED
@@ -0,0 +1,524 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * ricardo.ch AG - Switzerland
4
+ *
5
+ * @author Sylvain Rayé <support at diglin.com>
6
+ * @category Diglin
7
+ * @package Diglin_Ricento
8
+ * @copyright Copyright (c) 2015 ricardo.ch AG (http://www.ricardo.ch)
9
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
10
+ */
11
+
12
+ use \Diglin\Ricardo\Managers\SellerAccount\Parameter\SoldArticlesParameter;
13
+
14
+ /**
15
+ * Class Diglin_Ricento_Model_Dispatcher_Transaction
16
+ */
17
+ class Diglin_Ricento_Model_Dispatcher_Transaction extends Diglin_Ricento_Model_Dispatcher_Abstract
18
+ {
19
+ /**
20
+ * @var int
21
+ */
22
+ protected $_logType = Diglin_Ricento_Model_Products_Listing_Log::LOG_TYPE_TRANSACTION;
23
+
24
+ /**
25
+ * @var string
26
+ */
27
+ protected $_jobType = Diglin_Ricento_Model_Sync_Job::TYPE_TRANSACTION;
28
+
29
+ /**
30
+ * Create Order Jobs for all products listing with the listed status
31
+ *
32
+ * @return $this
33
+ */
34
+ public function proceed()
35
+ {
36
+ $plResource = Mage::getResourceModel('diglin_ricento/products_listing');
37
+ $readConnection = $plResource->getReadConnection();
38
+ $select = $readConnection
39
+ ->select()
40
+ ->from($plResource->getTable('diglin_ricento/products_listing'), 'entity_id');
41
+
42
+ $listingIds = $readConnection->fetchCol($select);
43
+
44
+ foreach ($listingIds as $listingId) {
45
+ $select = $readConnection
46
+ ->select()
47
+ ->from(array('pli' => $plResource->getTable('diglin_ricento/products_listing_item')), 'item_id')
48
+ ->where('type <> ?', Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)
49
+ ->where('products_listing_id = :id AND is_planned = 0')
50
+ ->where('status IN (?)', array(Diglin_Ricento_Helper_Data::STATUS_LISTED, Diglin_Ricento_Helper_Data::STATUS_SOLD));
51
+
52
+ $binds = array('id' => $listingId);
53
+ $countListedItems = count($readConnection->fetchAll($select, $binds));
54
+
55
+ if ($countListedItems == 0) {
56
+ continue;
57
+ }
58
+
59
+ /**
60
+ * Check that there is not already running job instead of creating a new one
61
+ */
62
+ Mage::getResourceModel('diglin_ricento/sync_job')->cleanupPendingJob($this->_jobType, $listingId);
63
+
64
+ // pending progress doesn't make sense here as we cleanup before but keep it to be sure everything ok
65
+ $job = Mage::getModel('diglin_ricento/sync_job');
66
+ $job->loadByTypeListingIdProgress($this->_jobType, $listingId, array(
67
+ Diglin_Ricento_Model_Sync_Job::PROGRESS_PENDING,
68
+ Diglin_Ricento_Model_Sync_Job::PROGRESS_CHUNK_RUNNING
69
+ ));
70
+
71
+ if ($job->getId()) {
72
+ continue;
73
+ }
74
+
75
+ $job
76
+ ->setJobType($this->_jobType)
77
+ ->setProgress(Diglin_Ricento_Model_Sync_Job::PROGRESS_PENDING)
78
+ ->setJobMessage(array($job->getJobMessage(true)))
79
+ ->save();
80
+
81
+ $jobListing = Mage::getModel('diglin_ricento/sync_job_listing');
82
+ $jobListing
83
+ ->setProductsListingId($listingId)
84
+ ->setTotalCount($countListedItems)
85
+ ->setTotalProceed(0)
86
+ ->setJobId($job->getId())
87
+ ->save();
88
+ }
89
+
90
+ unset($listingIds);
91
+ unset($readConnection);
92
+ unset($job);
93
+ unset($jobListing);
94
+
95
+ return parent::proceed();
96
+ }
97
+
98
+ /**
99
+ * @return $this|mixed
100
+ */
101
+ protected function _proceed()
102
+ {
103
+ $article = null;
104
+ $soldArticles = array();
105
+
106
+ $itemCollection = $this->_getItemCollection(array(Diglin_Ricento_Helper_Data::STATUS_LISTED, Diglin_Ricento_Helper_Data::STATUS_SOLD), $this->_currentJobListing->getLastItemId());
107
+ $itemCollection->addFieldToFilter('is_planned', 0);
108
+
109
+ $ricardoArticleIds = $itemCollection->getColumnValues('ricardo_article_id');
110
+ $lastItem = $itemCollection->getLastItem();
111
+
112
+ try {
113
+ $soldArticles = $this->getSoldArticles($ricardoArticleIds);
114
+ } catch (Exception $e) {
115
+ $this->_handleException($e, Mage::getSingleton('diglin_ricento/api_services_selleraccount'));
116
+ $e = null;
117
+ // keep going - no break
118
+ }
119
+
120
+ /* @var $item Diglin_Ricento_Model_Products_Listing_Item */
121
+ foreach ($soldArticles as $soldArticle) {
122
+ /**
123
+ * Save item information and eventual error messages
124
+ */
125
+ if (isset($soldArticle['item_message'])) {
126
+ $this->_getListingLog()->saveLog(array(
127
+ 'job_id' => $this->_currentJob->getId(),
128
+ 'product_title' => $soldArticle['product_title'],
129
+ 'product_id' => $soldArticle['product_id'],
130
+ 'products_listing_id' => $this->_productsListingId,
131
+ 'message' => (is_array($soldArticle['item_message'])) ? $this->_jsonEncode($soldArticle['item_message']) : $soldArticle['item_message'],
132
+ 'log_status' => $soldArticle['item_status'],
133
+ 'log_type' => $this->_logType,
134
+ 'created_at' => Mage::getSingleton('core/date')->gmtDate()
135
+ ));
136
+ }
137
+ }
138
+
139
+ /**
140
+ * Save the current information of the process to allow live display via ajax call
141
+ */
142
+ $this->_totalProceed += count($ricardoArticleIds);
143
+ $this->_currentJobListing->saveCurrentJob(array(
144
+ 'total_proceed' => $this->_totalProceed,
145
+ 'last_item_id' => $lastItem->getId()
146
+ ));
147
+
148
+ /**
149
+ * Stop the list if all products listing items are stopped
150
+ */
151
+ if ($this->_productsListingId) {
152
+ Mage::getResourceModel('diglin_ricento/products_listing')->setStatusStop($this->_productsListingId);
153
+ }
154
+
155
+ unset($itemCollection);
156
+
157
+ return $this;
158
+ }
159
+
160
+ /**
161
+ * @param array $articleIds
162
+ * @return array
163
+ */
164
+ private function _getSoldArticlesList(array $articleIds)
165
+ {
166
+ $soldArticlesParameter = new SoldArticlesParameter();
167
+ $delay = (3 * 24 * 60 * 60); // 3 days
168
+
169
+ $transactionCollection = Mage::getResourceModel('diglin_ricento/sales_transaction_collection');
170
+ $transactionCollection
171
+ ->addFieldToFilter('order_id', new Zend_Db_Expr('NULL'))
172
+ ->getSelect()
173
+ ->where('UNIX_TIMESTAMP(created_at) + (?) < UNIX_TIMESTAMP(now())', $delay);
174
+
175
+ /**
176
+ * Set minimum end date to filter e.g. last day. Do not use a higher value as the minimum sales duration is 1 day,
177
+ * we prevent to have conflict with several sold articles having similar internal reference
178
+ */
179
+ $soldArticlesParameter
180
+ ->setPageSize($this->_limit) // if not defined, default is 10
181
+ ->setArticleIdsFilter($articleIds)
182
+ ->setExcludedTransactionIdsFilter($transactionCollection->getColumnValues('transaction_id'))
183
+ ->setMinimumEndDate($this->_getHelper()->getJsonDate(time() - $delay));
184
+
185
+ $sellerAccountService = Mage::getSingleton('diglin_ricento/api_services_selleraccount')->setCanUseCache(false);
186
+ $sellerAccountService->setCurrentWebsite($this->_getListing()->getWebsiteId());
187
+
188
+ $soldArticlesResult = $sellerAccountService->getSoldArticles($soldArticlesParameter);
189
+
190
+ return array_reverse($soldArticlesResult['SoldArticles']);
191
+ }
192
+
193
+ /**
194
+ * @param array $articleIds
195
+ * @param Diglin_Ricento_Model_Products_Listing_Item $productItem
196
+ * @return bool
197
+ * @throws Exception
198
+ */
199
+ public function getSoldArticles($articleIds = array(), Diglin_Ricento_Model_Products_Listing_Item $productItem = null)
200
+ {
201
+ $soldArticlesReturn = array();
202
+
203
+ foreach ($this->_getSoldArticlesList($articleIds) as $soldArticle) {
204
+
205
+ $rawData = $soldArticle;
206
+ $soldArticle = $this->_getHelper()->extractData($soldArticle);
207
+ $transaction = $soldArticle->getTransaction();
208
+
209
+ if ($transaction && count($transaction) > 0) {
210
+
211
+ /**
212
+ * 1. Check that the transaction doesn't already exists
213
+ */
214
+ if (Mage::getResourceModel('diglin_ricento/sales_transaction_collection')
215
+ ->addFieldToFilter('bid_id', $transaction->getBidId())->getSize()
216
+ ) {
217
+ continue;
218
+ }
219
+
220
+ /**
221
+ * 2. Check if the products listing item exists and is listed
222
+ */
223
+ $references = $soldArticle->getArticleInternalReferences();
224
+ if (!isset($references[0]['InternalReferenceValue'])) {
225
+ continue;
226
+ }
227
+
228
+ $extractedInternReference = $this->_getHelper()->extractInternalReference($references[0]['InternalReferenceValue']);
229
+ if (!($extractedInternReference instanceof Varien_Object)) {
230
+ continue;
231
+ }
232
+
233
+ if (is_null($productItem) || $productItem->getId() != $extractedInternReference->getItemId()) {
234
+ $productItem = Mage::getModel('diglin_ricento/products_listing_item')->load($extractedInternReference->getItemId());
235
+ $productItem->setLoadFallbackOptions(true);
236
+ }
237
+
238
+ if (!$productItem->getId() || (!in_array($productItem->getStatus(), array(Diglin_Ricento_Helper_Data::STATUS_LISTED, Diglin_Ricento_Helper_Data::STATUS_SOLD)))) {
239
+ continue;
240
+ }
241
+
242
+ /**
243
+ * 3. Create customer if not exist and set his default billing address
244
+ */
245
+ $customer = $this->getCustomerFromTransaction($transaction->getBuyer(), $this->_getListing()->getWebsiteId());
246
+
247
+ if ($customer) {
248
+ $address = $this->getBillingAddress($customer, $transaction);
249
+ } else {
250
+ Mage::log($transaction->getBuyer(), Zend_Log::ERR, Diglin_Ricento_Helper_Data::LOG_FILE, true);
251
+ throw new Exception($this->_getHelper()->__('Customer creation failed! ricardo.ch transaction cannot be added.'));
252
+ }
253
+
254
+ /**
255
+ * 4. Insert transaction into DB for future use
256
+ */
257
+ $salesTransaction = $this->saveTransaction($transaction, $customer, $address, $soldArticle, $productItem, $rawData);
258
+
259
+ /**
260
+ * 5. Decrease the quantity at products listing item level and stop it if needed
261
+ */
262
+ $productItem
263
+ ->setQtyInventory($productItem->getQtyInventory() - $salesTransaction->getQty())
264
+ ->setStatus(Diglin_Ricento_Helper_Data::STATUS_SOLD)
265
+ ->save();
266
+
267
+ if (!isset($soldArticlesReturn[$productItem->getId()])) {
268
+ $soldArticlesReturn[$productItem->getId()] = array(
269
+ 'item_id' => $productItem->getId(),
270
+ 'product_title' => $productItem->getProductTitle(),
271
+ 'product_id' => $productItem->getProductId(),
272
+ 'item_message' => array('success' => $this->_getHelper()->__('The product has been sold')),
273
+ 'item_status' => Diglin_Ricento_Model_Products_Listing_Log::STATUS_SUCCESS
274
+ );
275
+ }
276
+ }
277
+ }
278
+
279
+ unset($salesTransaction);
280
+ unset($soldArticlesParameter);
281
+ unset($sellerAccountService);
282
+ unset($soldArticles);
283
+ unset($productItem);
284
+ unset($customer);
285
+
286
+ return $soldArticlesReturn;
287
+ }
288
+
289
+ /**
290
+ * Find or create customer if needed based on ricardo data
291
+ *
292
+ * @param Varien_Object $buyer
293
+ * @param int $websiteId
294
+ * @return bool|Mage_Customer_Model_Customer
295
+ */
296
+ public function getCustomerFromTransaction(Varien_Object $buyer, $websiteId = Mage_Core_Model_App::ADMIN_STORE_ID)
297
+ {
298
+ if (!$buyer->getBuyerId()) {
299
+ return false;
300
+ }
301
+
302
+ $store = $this->getStoreFromWebsite($websiteId);
303
+
304
+ /* @var $customer Mage_Customer_Model_Customer */
305
+ $customer = Mage::getModel('customer/customer')
306
+ ->setWebsiteId($websiteId)
307
+ ->loadByEmail($buyer->getEmail());
308
+
309
+ if (!$customer->getId()) {
310
+ $customer
311
+ ->setFirstname($buyer->getFirstName())
312
+ ->setLastname($buyer->getLastName())
313
+ ->setEmail($buyer->getEmail())
314
+ ->setPassword($customer->generatePassword())
315
+ ->setStoreId($store->getId())
316
+ ->setWebsiteId($websiteId)
317
+ ->setConfirmation(null);
318
+ }
319
+
320
+ if (!$customer->getRicardoId()) {
321
+ $customer
322
+ ->setRicardoId($buyer->getBuyerId())
323
+ ->setRicardoUsername($buyer->getNickName());
324
+ }
325
+
326
+ $customer->save();
327
+
328
+ Mage::app()->getLocale()->emulate($store->getId());
329
+
330
+ if ($customer->isObjectNew() && Mage::getStoreConfigFlag(Diglin_Ricento_Helper_Data::CFG_ACCOUNT_CREATION_EMAIL, $store->getId())) {
331
+ if ($customer->isConfirmationRequired()) {
332
+ $typeEmail = 'confirmation';
333
+ } else {
334
+ $typeEmail = 'registered';
335
+ }
336
+ $customer->sendNewAccountEmail($typeEmail, '', $store->getId());
337
+ }
338
+
339
+ Mage::app()->getLocale()->revert();
340
+
341
+ return $customer;
342
+ }
343
+
344
+ /**
345
+ * @param Mage_Customer_Model_Customer $customer
346
+ * @param $transaction
347
+ * @return Mage_Customer_Model_Address
348
+ * @throws Exception
349
+ */
350
+ public function getBillingAddress(Mage_Customer_Model_Customer $customer, $transaction)
351
+ {
352
+ $buyerAddress = $transaction->getBuyer()->getAddresses();
353
+
354
+ $address = $customer->getDefaultBillingAddress();
355
+
356
+ $street = $buyerAddress->getAddress1() . ' ' . $buyerAddress->getStreetNumber()
357
+ . (($buyerAddress->getAddress2()) ? "\n" . $buyerAddress->getAddress2() : '')
358
+ . (($buyerAddress->getPostalBox()) ? "\n" . $buyerAddress->getPostalBox() : '');
359
+
360
+ $postCode = $buyerAddress->getZipCode();
361
+ $city = $buyerAddress->getCity();
362
+
363
+ if (!$address || ($address->getCity() != $city && $address->getPostcode() != $postCode && $address->getStreet() != $street)) {
364
+
365
+ /**
366
+ * Ricardo API doesn't provide the region and Magento 1.6 doesn't allow to make region optional
367
+ * We use the first region found for the current country but it's far to be good
368
+ * @todo add a "other" region into each country having required region
369
+ */
370
+ $countryId = $this->getCountryId($buyerAddress->getCountry());
371
+ $regionId = null;
372
+ if (Mage::helper('directory')->isRegionRequired($countryId)) {
373
+ $regionId = Mage::getModel('directory/region')->getCollection()
374
+ ->addFieldToFilter('country_id', $countryId)
375
+ ->getFirstItem()
376
+ ->getId();
377
+ }
378
+
379
+ $phone = ($transaction->getBuyer()->getPhone()) ? $transaction->getBuyer()->getPhone() : $transaction->getBuyer()->getMobile();
380
+
381
+ $address = Mage::getModel('customer/address');
382
+ $address
383
+ ->setCustomerId($customer->getId())
384
+ ->setCompany($transaction->getBuyer()->getCompanyName())
385
+ ->setLastname($customer->getLastname())
386
+ ->setFirstname($customer->getFirstname())
387
+ ->setStreet($street)
388
+ ->setPostcode($postCode)
389
+ ->setCity($city)
390
+ ->setRegionId($regionId)
391
+ ->setCountryId($countryId)
392
+ ->setTelephone($phone)
393
+ ->setIsDefaultBilling(true)
394
+ ->setIsDefaultShipping(true)
395
+ ->setSaveInAddressBook(1)
396
+ ->save();
397
+
398
+ $customer->addAddress($address);
399
+ }
400
+
401
+ return $address;
402
+ }
403
+
404
+ /**
405
+ * @param $transaction
406
+ * @param Mage_Customer_Model_Customer $customer
407
+ * @param $address
408
+ * @param $soldArticle
409
+ * @param Diglin_Ricento_Model_Products_Listing_Item $productItem
410
+ * @param $rawData
411
+ * @return Diglin_Ricento_Model_Sales_Transaction
412
+ * @throws Exception
413
+ */
414
+ public function saveTransaction(
415
+ $transaction,
416
+ Mage_Customer_Model_Customer $customer,
417
+ Mage_Customer_Model_Address $address,
418
+ $soldArticle,
419
+ Diglin_Ricento_Model_Products_Listing_Item $productItem,
420
+ $rawData
421
+ ) {
422
+ $lang = $this->_getHelper()->getLocalCodeFromRicardoLanguageId($soldArticle->getMainLanguageId());
423
+ $transactionData = array(
424
+ 'bid_id' => $transaction->getBidId(),
425
+ 'website_id' => $this->_getListing()->getWebsiteId(),
426
+ 'customer_id' => $customer->getId(),
427
+ 'address_id' => $address->getId(),
428
+ 'ricardo_customer_id' => $customer->getRicardoId(),
429
+ 'ricardo_article_id' => $soldArticle->getArticleId(),
430
+ 'qty' => $transaction->getBuyerQuantity(),
431
+ 'view_count' => $soldArticle->getViewCount(),
432
+ 'shipping_fee' => $soldArticle->getDeliveryCost(),
433
+ 'shipping_text' => $soldArticle->getDeliveryText(), // @fixme - if bought in FR and the API use the DE key, text will in DE. I have no solution now
434
+ 'shipping_method' => $soldArticle->getDeliveryId(),
435
+ 'shipping_cumulative_fee' => (int)$soldArticle->getIsCumulativeShipping(),
436
+ 'language_id' => $soldArticle->getMainLanguageId(),
437
+ 'payment_methods' => implode(',', $soldArticle->getPaymentMethodIds()->getData()),
438
+ 'shipping_description' => $productItem->getShippingPaymentRule()->getShippingDescription($lang),
439
+ 'payment_description' => $productItem->getShippingPaymentRule()->getPaymentDescription($lang),
440
+ 'total_bid_price' => $soldArticle->getWinningBidPrice(),
441
+ 'product_id' => $productItem->getProductId(),
442
+ 'raw_data' => Mage::helper('core')->jsonEncode($rawData),
443
+ 'sold_at' => $this->_getHelper()->getJsonTimestamp($soldArticle->getEndDate())
444
+ );
445
+
446
+ $salesTransaction = Mage::getModel('diglin_ricento/sales_transaction')
447
+ ->addData($transactionData)
448
+ ->save();
449
+
450
+ return $salesTransaction;
451
+ }
452
+
453
+ /**
454
+ * Retrieve order create model
455
+ *
456
+ * @return Diglin_Ricento_Model_Sales_Order_Create
457
+ */
458
+ public function getOrderCreateModel()
459
+ {
460
+ return Mage::getSingleton('diglin_ricento/sales_order_create');
461
+ }
462
+
463
+ /**
464
+ * @param $countryRicardoId
465
+ * @return string
466
+ * @throws Exception
467
+ */
468
+ public function getCountryId($countryRicardoId)
469
+ {
470
+ $countryName = '';
471
+ $countries = Mage::getSingleton('diglin_ricento/api_services_system')
472
+ ->setCurrentWebsite($this->_getListing()->getWebsiteId())
473
+ ->getCountries();
474
+
475
+ foreach ($countries as $country) {
476
+ if ($country['CountryId'] == $countryRicardoId) {
477
+ $countryName = $country['CountryName'];
478
+ break;
479
+ }
480
+ }
481
+
482
+ $code = $this->translateCountryNameToCode($countryName);
483
+ if (!$code) {
484
+ throw new Exception(Mage::helper('diglin_ricento')->__('Country Code is not available. Please contact the author of this extension or support.'));
485
+ }
486
+ $directory = Mage::getModel('directory/country')->loadByCode($code);
487
+ return $directory->getCountryId();
488
+ }
489
+
490
+ /**
491
+ * VERY TEMPORARY SOLUTION until ricardo provide an API method to get the correct value
492
+ * @todo remove it as soon the API has implemented the method to get it
493
+ *
494
+ * @param $countryName
495
+ * @return string
496
+ */
497
+ public function translateCountryNameToCode($countryName)
498
+ {
499
+ $countryCode = array(
500
+ 'Schweiz' => 'CH',
501
+ 'Suisse' => 'CH',
502
+ 'Liechtenstein' => 'LI', // ok for both lang
503
+ 'Österreich' => 'AT',
504
+ 'Autriche' => 'AT',
505
+ 'Deutschland' => 'DE',
506
+ 'Allemagne' => 'DE',
507
+ 'Frankreich' => 'FR',
508
+ 'France' => 'FR',
509
+ 'Italien' => 'IT',
510
+ 'Italie' => 'IT',
511
+ );
512
+
513
+ return (isset($countryCode[$countryName])) ? $countryCode[$countryName] : false;
514
+ }
515
+
516
+ /**
517
+ * @param int $websiteId
518
+ * @return Mage_Core_Model_Store
519
+ */
520
+ public function getStoreFromWebsite($websiteId)
521
+ {
522
+ return Mage::app()->getWebsite($websiteId)->getDefaultStore();
523
+ }
524
+ }
app/code/community/Diglin/Ricento/Model/Observer.php CHANGED
@@ -154,7 +154,8 @@ class Diglin_Ricento_Model_Observer
154
 
155
  if (!empty($label)) {
156
  $transport->setData(array(
157
- 'bid_ids' => (isset($additionalData->ricardo_bid_ids)) ? $additionalData->ricardo_bid_ids : null,
 
158
  'methods' => $label,
159
  'information' => $information));
160
  }
@@ -235,7 +236,7 @@ class Diglin_Ricento_Model_Observer
235
  /* @var $collection Mage_Eav_Model_Entity_Collection_Abstract */
236
  $collection = $observer->getEvent()->getCollection();
237
  $entity = $collection->getEntity();
238
- if (!empty($entity) && $entity->getType() == 'customer') {
239
  $collection->addAttributeToSelect('ricardo_username');
240
  }
241
  }
154
 
155
  if (!empty($label)) {
156
  $transport->setData(array(
157
+ // 'bid_ids' => (isset($additionalData->ricardo_bid_ids)) ? $additionalData->ricardo_bid_ids : null,
158
+ 'article_ids' => (isset($additionalData->ricardo_article_ids)) ? $additionalData->ricardo_article_ids : null,
159
  'methods' => $label,
160
  'information' => $information));
161
  }
236
  /* @var $collection Mage_Eav_Model_Entity_Collection_Abstract */
237
  $collection = $observer->getEvent()->getCollection();
238
  $entity = $collection->getEntity();
239
+ if (!empty($entity) && $entity instanceof Mage_Eav_Model_Entity_Abstract && $entity->getType() == 'customer') {
240
  $collection->addAttributeToSelect('ricardo_username');
241
  }
242
  }
app/code/community/Diglin/Ricento/Model/Products/Listing/Item.php CHANGED
@@ -583,6 +583,7 @@ class Diglin_Ricento_Model_Products_Listing_Item extends Mage_Core_Model_Abstrac
583
  if ($imageExtension) {
584
  $picture = new ArticlePictureParameter();
585
  $picture
 
586
  // we encode in Json to minimize memory consumption
587
  ->setPictureBytes(json_encode(array_values(unpack('C*', file_get_contents($filename)))))
588
  ->setPictureExtension($imageExtension)
@@ -683,7 +684,10 @@ class Diglin_Ricento_Model_Products_Listing_Item extends Mage_Core_Model_Abstrac
683
  /**
684
  * Start Date is mandatory for auction but optional for buy now sales type
685
  */
686
- $articleInformation->setStartDate($helper->getJsonDate($helper->getStartingDate($this)));
 
 
 
687
 
688
  if ($salesType == Diglin_Ricento_Model_Config_Source_Sales_Type::AUCTION) {
689
  $articleInformation
583
  if ($imageExtension) {
584
  $picture = new ArticlePictureParameter();
585
  $picture
586
+ // ->setPictureInBase64(base64_encode(file_get_contents($filename)))
587
  // we encode in Json to minimize memory consumption
588
  ->setPictureBytes(json_encode(array_values(unpack('C*', file_get_contents($filename)))))
589
  ->setPictureExtension($imageExtension)
684
  /**
685
  * Start Date is mandatory for auction but optional for buy now sales type
686
  */
687
+ $startingDate = $helper->getStartingDate($this);
688
+ if (!is_null($startingDate)) {
689
+ $articleInformation->setStartDate($helper->getJsonDate($startingDate));
690
+ }
691
 
692
  if ($salesType == Diglin_Ricento_Model_Config_Source_Sales_Type::AUCTION) {
693
  $articleInformation
app/code/community/Diglin/Ricento/Model/Products/Listing/Log.php CHANGED
@@ -46,6 +46,7 @@ class Diglin_Ricento_Model_Products_Listing_Log extends Mage_Core_Model_Abstract
46
  const LOG_TYPE_SYNCLIST = 4;
47
  const LOG_TYPE_ORDER = 5;
48
  const LOG_TYPE_CLOSED = 6;
 
49
 
50
  /**
51
  * Prefix of model events names
46
  const LOG_TYPE_SYNCLIST = 4;
47
  const LOG_TYPE_ORDER = 5;
48
  const LOG_TYPE_CLOSED = 6;
49
+ const LOG_TYPE_TRANSACTION = 7;
50
 
51
  /**
52
  * Prefix of model events names
app/code/community/Diglin/Ricento/Model/Sync/Job.php CHANGED
@@ -34,6 +34,7 @@ class Diglin_Ricento_Model_Sync_Job extends Diglin_Ricento_Model_Sync_Abstract
34
  const TYPE_CHECK_LIST = 'check_list';
35
  const TYPE_LIST = 'list';
36
  const TYPE_STOP = 'stop';
 
37
  const TYPE_ORDER = 'order';
38
  const TYPE_SYNCLIST = 'sync_list';
39
  const TYPE_CLOSED = 'closed';
34
  const TYPE_CHECK_LIST = 'check_list';
35
  const TYPE_LIST = 'list';
36
  const TYPE_STOP = 'stop';
37
+ const TYPE_TRANSACTION = 'transaction';
38
  const TYPE_ORDER = 'order';
39
  const TYPE_SYNCLIST = 'sync_list';
40
  const TYPE_CLOSED = 'closed';
app/code/community/Diglin/Ricento/Model/Validate/Products/Item.php CHANGED
@@ -271,7 +271,7 @@ class Diglin_Ricento_Model_Validate_Products_Item extends Zend_Validate_Abstract
271
  {
272
  $startDate = Mage::helper('diglin_ricento')->getStartingDate($item);
273
 
274
- if (!is_null($startDate) && $startDate < (time() + 59*60)) {
275
  // Warning - starting date must be 1 hour in future
276
  $this->_warnings[] = $this->getHelper()->__('The starting date must start one hour in future. It will be automatically updated to list on ricardo.');
277
  }
271
  {
272
  $startDate = Mage::helper('diglin_ricento')->getStartingDate($item);
273
 
274
+ if (!is_null($startDate) && $startDate < (time() + 3600)) {
275
  // Warning - starting date must be 1 hour in future
276
  $this->_warnings[] = $this->getHelper()->__('The starting date must start one hour in future. It will be automatically updated to list on ricardo.');
277
  }
{lib/Diglin/Ricardo → app/code/community/Diglin/Ricento/Test}/.DS_Store RENAMED
Binary file
app/code/community/Diglin/Ricento/controllers/.DS_Store ADDED
Binary file
app/code/community/Diglin/Ricento/controllers/Adminhtml/IndexController.php CHANGED
@@ -16,7 +16,4 @@ require_once 'Mage/Adminhtml/controllers/IndexController.php';
16
  *
17
  * use the adminhtml index controller for standard actions like deniedJsonAction()
18
  */
19
- class Diglin_Ricento_Adminhtml_IndexController extends Mage_Adminhtml_IndexController
20
- {
21
-
22
- }
16
  *
17
  * use the adminhtml index controller for standard actions like deniedJsonAction()
18
  */
19
+ class Diglin_Ricento_Adminhtml_IndexController extends Mage_Adminhtml_IndexController {}
 
 
 
app/code/community/Diglin/Ricento/controllers/Adminhtml/Products/Listing/ItemController.php CHANGED
@@ -27,13 +27,19 @@ class Diglin_Ricento_Adminhtml_Products_Listing_ItemController extends Diglin_Ri
27
  if ($this->getRequest()->isPost()) {
28
  $this->_itemIds = array_map('intval', (array) $this->getRequest()->getPost('item', array()));
29
  } else {
30
- $this->_itemIds = array_map('intval', explode(',', $this->getRequest()->getParam('item')));
 
 
31
  }
32
 
33
  if ($this->_itemIds) {
34
  $itemCollection
35
  ->addFieldToFilter('products_listing_id', $this->_getListing()->getId())
36
  ->addFieldToFilter('item_id', array('in' => $this->_itemIds));
 
 
 
 
37
  } else {
38
  $itemCollection
39
  ->addFieldToFilter('item_id', array('in' => explode(',', $this->getRequest()->getPost('item_ids'))));
27
  if ($this->getRequest()->isPost()) {
28
  $this->_itemIds = array_map('intval', (array) $this->getRequest()->getPost('item', array()));
29
  } else {
30
+ if ($this->getRequest()->getParam('item')) {
31
+ $this->_itemIds = array_map('intval', explode(',', $this->getRequest()->getParam('item')));
32
+ }
33
  }
34
 
35
  if ($this->_itemIds) {
36
  $itemCollection
37
  ->addFieldToFilter('products_listing_id', $this->_getListing()->getId())
38
  ->addFieldToFilter('item_id', array('in' => $this->_itemIds));
39
+ } elseif ($this->getRequest()->getParam('product_id')) {
40
+ $itemCollection
41
+ ->addFieldToFilter('products_listing_id', $this->_getListing()->getId())
42
+ ->addFieldToFilter('product_id', array('in' => $this->getRequest()->getParam('product_id')));
43
  } else {
44
  $itemCollection
45
  ->addFieldToFilter('item_id', array('in' => explode(',', $this->getRequest()->getPost('item_ids'))));
app/code/community/Diglin/Ricento/controllers/Adminhtml/SupportController.php CHANGED
@@ -9,6 +9,11 @@
9
  */
10
  class Diglin_Ricento_Adminhtml_SupportController extends Mage_Adminhtml_Controller_Action
11
  {
 
 
 
 
 
12
  public function indexAction()
13
  {
14
  $this->_redirect('*/*/contact');
@@ -35,12 +40,22 @@ class Diglin_Ricento_Adminhtml_SupportController extends Mage_Adminhtml_Controll
35
 
36
  public function exportAction()
37
  {
 
 
 
 
 
38
  $gzDestination = Mage::helper('diglin_ricento/support')->exportAll();
39
  return $this->_prepareDownloadResponse('ricardo_support.tar.gz', file_get_contents($gzDestination));
40
  }
41
 
42
  public function sendAction()
43
  {
 
 
 
 
 
44
  $helper = Mage::helper('diglin_ricento/support');
45
 
46
  try {
9
  */
10
  class Diglin_Ricento_Adminhtml_SupportController extends Mage_Adminhtml_Controller_Action
11
  {
12
+ protected function _isAllowed()
13
+ {
14
+ return Mage::getSingleton('admin/session')->isAllowed('ricento/support');
15
+ }
16
+
17
  public function indexAction()
18
  {
19
  $this->_redirect('*/*/contact');
40
 
41
  public function exportAction()
42
  {
43
+ if (!Mage::getSingleton('admin/session')->isAllowed('ricento/support/export')) {
44
+ $this->_forward('denied');
45
+ return $this;
46
+ }
47
+
48
  $gzDestination = Mage::helper('diglin_ricento/support')->exportAll();
49
  return $this->_prepareDownloadResponse('ricardo_support.tar.gz', file_get_contents($gzDestination));
50
  }
51
 
52
  public function sendAction()
53
  {
54
+ if (!Mage::getSingleton('admin/session')->isAllowed('ricento/support/export')) {
55
+ $this->_forward('denied');
56
+ return $this;
57
+ }
58
+
59
  $helper = Mage::helper('diglin_ricento/support');
60
 
61
  try {
app/code/community/Diglin/Ricento/data/.DS_Store ADDED
Binary file
app/code/community/Diglin/Ricento/etc/config.xml CHANGED
@@ -13,7 +13,7 @@
13
  <config>
14
  <modules>
15
  <Diglin_Ricento>
16
- <version>1.2.0</version>
17
  </Diglin_Ricento>
18
  </modules>
19
 
@@ -273,6 +273,9 @@
273
  <list>
274
  <class>Diglin_Ricento_Model_Dispatcher_List</class>
275
  </list>
 
 
 
276
  <order>
277
  <class>Diglin_Ricento_Model_Dispatcher_Order</class>
278
  </order>
13
  <config>
14
  <modules>
15
  <Diglin_Ricento>
16
+ <version>1.3.0</version>
17
  </Diglin_Ricento>
18
  </modules>
19
 
273
  <list>
274
  <class>Diglin_Ricento_Model_Dispatcher_List</class>
275
  </list>
276
+ <transaction>
277
+ <class>Diglin_Ricento_Model_Dispatcher_Transaction</class>
278
+ </transaction>
279
  <order>
280
  <class>Diglin_Ricento_Model_Dispatcher_Order</class>
281
  </order>
app/code/community/Diglin/Ricento/sql/.DS_Store CHANGED
Binary file
app/design/adminhtml/default/default/template/ricento/payment/info/default.phtml CHANGED
@@ -17,9 +17,9 @@
17
  <?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?>:
18
 
19
  <?php if ($_specificInfo = $this->getSpecificInformation()):?>
20
- <?php if (isset($_specificInfo['bid_ids'])): ?>
21
  <div class="ricardo-payment-info">
22
- <p><?php echo Mage::helper('diglin_ricento')->__('Transactions: <strong>%s</strong>', $_specificInfo['bid_ids']) ?></p>
 
23
  <?php endif; ?>
24
  <ul>
25
  <li><?php echo implode(' / ', $_specificInfo['methods']) ?></li>
17
  <?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?>:
18
 
19
  <?php if ($_specificInfo = $this->getSpecificInformation()):?>
 
20
  <div class="ricardo-payment-info">
21
+ <?php if (isset($_specificInfo['article_ids'])): ?>
22
+ <p><?php echo Mage::helper('diglin_ricento')->__('Articles: <strong>%s</strong>', $_specificInfo['article_ids']) ?></p>
23
  <?php endif; ?>
24
  <ul>
25
  <li><?php echo implode(' / ', $_specificInfo['methods']) ?></li>
app/locale/de_CH/Diglin_Ricento.csv CHANGED
@@ -346,7 +346,7 @@
346
  "Listing","Listing"
347
  "Synchronization","Synchronisierung"
348
  "Orders","Bestellungen"
349
- "Transactions %s","Transaktionen %s"
350
  "You may also access to the %s content of this page</a> in a new window.","Sie können den %s Inhalt dieser Seite auch </a> in einem neuen Fenster bearbeiten."
351
  "Your ricardo.ch API token credentials are going to expire in %s days for the website ""%s"".","Ihre ricardo.ch-API-Token-Daten laufen in %s Tagen für diese Webseite ""%s"" ab."
352
  "No ricardo.ch API Authorization have been found for the website ""%s"".","Keine ricardo.ch-API-Authorisierung wurde für diese Website ""%s"" gefunden."
@@ -684,4 +684,5 @@
684
  "Example format: 200x300. Be aware: Size maximum of a product's picture is 600x600px on ricardo.ch","Beispiel Format: 200x300. Achtung: Maximale Bildgrösse auf riacrdo.ch ist 600x600px."
685
  "Use default store configuration","Standart Shop Konfiguration verwenden."
686
  "Allow Update Notification","Erlauben Update Notifizierung"
687
- "If you don't want to receive any notification regarding upcoming update, set this option to ""No"".","Wenn Sie kein Notifizierung von neue Versionen erhalten, setzen hier ""Nein""."
 
346
  "Listing","Listing"
347
  "Synchronization","Synchronisierung"
348
  "Orders","Bestellungen"
349
+ "Articles %s","Artikeln %s"
350
  "You may also access to the %s content of this page</a> in a new window.","Sie können den %s Inhalt dieser Seite auch </a> in einem neuen Fenster bearbeiten."
351
  "Your ricardo.ch API token credentials are going to expire in %s days for the website ""%s"".","Ihre ricardo.ch-API-Token-Daten laufen in %s Tagen für diese Webseite ""%s"" ab."
352
  "No ricardo.ch API Authorization have been found for the website ""%s"".","Keine ricardo.ch-API-Authorisierung wurde für diese Website ""%s"" gefunden."
684
  "Example format: 200x300. Be aware: Size maximum of a product's picture is 600x600px on ricardo.ch","Beispiel Format: 200x300. Achtung: Maximale Bildgrösse auf riacrdo.ch ist 600x600px."
685
  "Use default store configuration","Standart Shop Konfiguration verwenden."
686
  "Allow Update Notification","Erlauben Update Notifizierung"
687
+ "If you don't want to receive any notification regarding upcoming update, set this option to ""No"".","Wenn Sie kein Notifizierung von neue Versionen erhalten, setzen hier ""Nein""."
688
+ "Articles: <strong>%s</strong>","Artikeln: <strong>%s</strong>"
app/locale/de_DE/Diglin_Ricento.csv CHANGED
@@ -346,7 +346,7 @@
346
  "Listing","Listing"
347
  "Synchronization","Synchronisierung"
348
  "Orders","Bestellungen"
349
- "Transactions %s","Transaktionen %s"
350
  "You may also access to the %s content of this page</a> in a new window.","Sie können den %s Inhalt dieser Seite auch </a> in einem neuen Fenster bearbeiten."
351
  "Your ricardo.ch API token credentials are going to expire in %s days for the website ""%s"".","Ihre ricardo.ch-API-Token-Daten laufen in %s Tagen für diese Webseite ""%s"" ab."
352
  "No ricardo.ch API Authorization have been found for the website ""%s"".","Keine ricardo.ch-API-Authorisierung wurde für diese Website ""%s"" gefunden."
@@ -684,4 +684,5 @@
684
  "Example format: 200x300. Be aware: Size maximum of a product's picture is 600x600px on ricardo.ch","Beispiel Format: 200x300. Achtung: Maximale Bildgrösse auf riacrdo.ch ist 600x600px."
685
  "Use default store configuration","Standart Shop Konfiguration verwenden."
686
  "Allow Update Notification","Erlauben Update Notifizierung"
687
- "If you don't want to receive any notification regarding upcoming update, set this option to ""No"".","Wenn Sie kein Notifizierung von neue Versionen erhalten, setzen hier ""Nein""."
 
346
  "Listing","Listing"
347
  "Synchronization","Synchronisierung"
348
  "Orders","Bestellungen"
349
+ "Articles %s","Artikeln %s"
350
  "You may also access to the %s content of this page</a> in a new window.","Sie können den %s Inhalt dieser Seite auch </a> in einem neuen Fenster bearbeiten."
351
  "Your ricardo.ch API token credentials are going to expire in %s days for the website ""%s"".","Ihre ricardo.ch-API-Token-Daten laufen in %s Tagen für diese Webseite ""%s"" ab."
352
  "No ricardo.ch API Authorization have been found for the website ""%s"".","Keine ricardo.ch-API-Authorisierung wurde für diese Website ""%s"" gefunden."
684
  "Example format: 200x300. Be aware: Size maximum of a product's picture is 600x600px on ricardo.ch","Beispiel Format: 200x300. Achtung: Maximale Bildgrösse auf riacrdo.ch ist 600x600px."
685
  "Use default store configuration","Standart Shop Konfiguration verwenden."
686
  "Allow Update Notification","Erlauben Update Notifizierung"
687
+ "If you don't want to receive any notification regarding upcoming update, set this option to ""No"".","Wenn Sie kein Notifizierung von neue Versionen erhalten, setzen hier ""Nein""."
688
+ "Articles: <strong>%s</strong>","Artikeln: <strong>%s</strong>"
app/locale/en_US/Diglin_Ricento.csv CHANGED
@@ -346,7 +346,7 @@
346
  "Listing","Listing"
347
  "Synchronization","Synchronization"
348
  "Orders","Orders"
349
- "Transactions %s","Transactions %s"
350
  "You may also access to the %s content of this page</a> in a new window.","You may also access to the %s content of this page</a> in a new window."
351
  "Your ricardo.ch API token credentials are going to expire in %s days for the website ""%s"".","Your ricardo.ch API token credentials are going to expire in %s days for the website ""%s""."
352
  "No ricardo.ch API Authorization have been found for the website ""%s"".","No ricardo.ch API Authorization have been found for the website ""%s""."
@@ -684,4 +684,5 @@
684
  "Example format: 200x300. Be aware: Size maximum of a product's picture is 600x600px on ricardo.ch","Example format: 200x300. Be aware: Size maximum of a product's picture is 600x600px on ricardo.ch"
685
  "Use default store configuration","Use default store configuration"
686
  "Allow Update Notification","Allow Update Notification"
687
- "If you don't want to receive any notification regarding upcoming update, set this option to ""No"".","If you don't want to receive any notification regarding upcoming update, set this option to ""No""."
 
346
  "Listing","Listing"
347
  "Synchronization","Synchronization"
348
  "Orders","Orders"
349
+ "Articles %s","Articles %s"
350
  "You may also access to the %s content of this page</a> in a new window.","You may also access to the %s content of this page</a> in a new window."
351
  "Your ricardo.ch API token credentials are going to expire in %s days for the website ""%s"".","Your ricardo.ch API token credentials are going to expire in %s days for the website ""%s""."
352
  "No ricardo.ch API Authorization have been found for the website ""%s"".","No ricardo.ch API Authorization have been found for the website ""%s""."
684
  "Example format: 200x300. Be aware: Size maximum of a product's picture is 600x600px on ricardo.ch","Example format: 200x300. Be aware: Size maximum of a product's picture is 600x600px on ricardo.ch"
685
  "Use default store configuration","Use default store configuration"
686
  "Allow Update Notification","Allow Update Notification"
687
+ "If you don't want to receive any notification regarding upcoming update, set this option to ""No"".","If you don't want to receive any notification regarding upcoming update, set this option to ""No""."
688
+ "Articles: <strong>%s</strong>","Articles: <strong>%s</strong>"
app/locale/fr_FR/Diglin_Ricento.csv CHANGED
@@ -346,7 +346,7 @@
346
  "Listing","Liste"
347
  "Synchronization","Synchronisation"
348
  "Orders","Commandes"
349
- "Transactions %s","Transactions %s"
350
  "You may also access to the %s content of this page</a> in a new window.","Vous pouvez avoir accès au contenu %s de cette page</a> dans une nouvelle fenêtre"
351
  "Your ricardo.ch API token credentials are going to expire in %s days for the website ""%s"".","Votre ricardo.ch token API va expiré dans %s jours pour le site web ""%s""."
352
  "No ricardo.ch API Authorization have been found for the website ""%s"".","Aucune autorisation pour l'API de ricardo.ch n'a été trouvé pour le site web ""%s""."
@@ -685,4 +685,5 @@
685
  "Example format: 200x300. Be aware: Size maximum of a product's picture is 600x600px on ricardo.ch","Example de format: 200x300. Veuillez prendre en compte que la taille de l'image d'un produit sur ricardo.ch est de 600x600px"
686
  "Use default store configuration","Utiliser la configuration par défaut de la boutique"
687
  "Allow Update Notification","Autoriser les notifications de mise à jour"
688
- "If you don't want to receive any notification regarding upcoming update, set this option to ""No"".","Si vous ne souhaitez pas recevoir de notifications concernant les mises à jour futures de l'extension, sélectionnez non."
 
346
  "Listing","Liste"
347
  "Synchronization","Synchronisation"
348
  "Orders","Commandes"
349
+ "Articles %s","Articles %s"
350
  "You may also access to the %s content of this page</a> in a new window.","Vous pouvez avoir accès au contenu %s de cette page</a> dans une nouvelle fenêtre"
351
  "Your ricardo.ch API token credentials are going to expire in %s days for the website ""%s"".","Votre ricardo.ch token API va expiré dans %s jours pour le site web ""%s""."
352
  "No ricardo.ch API Authorization have been found for the website ""%s"".","Aucune autorisation pour l'API de ricardo.ch n'a été trouvé pour le site web ""%s""."
685
  "Example format: 200x300. Be aware: Size maximum of a product's picture is 600x600px on ricardo.ch","Example de format: 200x300. Veuillez prendre en compte que la taille de l'image d'un produit sur ricardo.ch est de 600x600px"
686
  "Use default store configuration","Utiliser la configuration par défaut de la boutique"
687
  "Allow Update Notification","Autoriser les notifications de mise à jour"
688
+ "If you don't want to receive any notification regarding upcoming update, set this option to ""No"".","Si vous ne souhaitez pas recevoir de notifications concernant les mises à jour futures de l'extension, sélectionnez non."
689
+ "Articles: <strong>%s</strong>","Articles: <strong>%s</strong>"
lib/Diglin/Ricardo/Managers/Search.php CHANGED
@@ -23,6 +23,10 @@ namespace Diglin\Ricardo\Managers;
23
 
24
  use Diglin\Ricardo\Managers\Search\Parameter\GetCategoryBestMatchParameter;
25
 
 
 
 
 
26
  class Search extends ManagerAbstract
27
  {
28
  /**
@@ -31,6 +35,8 @@ class Search extends ManagerAbstract
31
  protected $_serviceName = 'search';
32
 
33
  /**
 
 
34
  * @param GetCategoryBestMatchParameter $parameter
35
  * @return array
36
  */
23
 
24
  use Diglin\Ricardo\Managers\Search\Parameter\GetCategoryBestMatchParameter;
25
 
26
+ /**
27
+ * Class Search
28
+ * @package Diglin\Ricardo\Managers
29
+ */
30
  class Search extends ManagerAbstract
31
  {
32
  /**
35
  protected $_serviceName = 'search';
36
 
37
  /**
38
+ * Get Category Best Match
39
+ *
40
  * @param GetCategoryBestMatchParameter $parameter
41
  * @return array
42
  */
lib/Diglin/Ricardo/Managers/Sell.php CHANGED
@@ -104,21 +104,41 @@ class Sell extends ManagerAbstract
104
  }
105
 
106
  /**
 
107
  * @param InsertArticleParameter $parameter
108
  * @return array
109
  */
110
  public function insertArticle(InsertArticleParameter $parameter)
111
  {
112
- return $this->_lastInsertArticle = $this->_proceed('InsertArticle', $parameter);
113
  }
114
 
115
  /**
 
116
  * @param InsertArticlesParameter $parameter
117
  * @return array
118
  */
119
  public function insertArticles(InsertArticlesParameter $parameter)
120
  {
121
- return $this->_proceed('InsertArticles', $parameter);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  }
123
 
124
  /**
@@ -130,25 +150,50 @@ class Sell extends ManagerAbstract
130
  }
131
 
132
  /**
 
133
  * @param $articleId
134
  * @return array
135
  */
136
  public function relistArticle($articleId)
 
 
 
 
 
 
 
 
 
 
 
 
137
  {
138
  $antiforgery = $this->getServiceManager()->getSecurityManager()->getAntiforgeryToken();
139
- return $this->_proceed('RelistArticle', array('ArticleId' => $articleId, 'AntiforgeryToken' => $antiforgery));
140
  }
141
 
142
  /**
 
143
  * @param UpdateArticleParameter $parameter
144
  * @return float
145
  */
146
  public function updateArticle(UpdateArticleParameter $parameter)
147
  {
148
- $result = $this->_proceed('UpdateArticle', $parameter);
149
- return $result['ArticleFee'];
150
  }
151
 
 
 
 
 
 
 
 
 
 
 
 
 
152
 
153
  /**
154
  * @param UpdateArticlePicturesParameter $parameter
104
  }
105
 
106
  /**
107
+ * @deprecated
108
  * @param InsertArticleParameter $parameter
109
  * @return array
110
  */
111
  public function insertArticle(InsertArticleParameter $parameter)
112
  {
113
+ return $this->createArticle($parameter);
114
  }
115
 
116
  /**
117
+ * @deprecated
118
  * @param InsertArticlesParameter $parameter
119
  * @return array
120
  */
121
  public function insertArticles(InsertArticlesParameter $parameter)
122
  {
123
+ return $this->createArticles($parameter);
124
+ }
125
+
126
+ /**
127
+ * @param InsertArticleParameter $parameter
128
+ * @return array
129
+ */
130
+ public function createArticle(InsertArticleParameter $parameter)
131
+ {
132
+ return $this->_lastInsertArticle = $this->_proceed('CreateArticle', $parameter);
133
+ }
134
+
135
+ /**
136
+ * @param InsertArticlesParameter $parameter
137
+ * @return array
138
+ */
139
+ public function createArticles(InsertArticlesParameter $parameter)
140
+ {
141
+ return $this->_proceed('CreateArticles', $parameter);
142
  }
143
 
144
  /**
150
  }
151
 
152
  /**
153
+ * @deprecated
154
  * @param $articleId
155
  * @return array
156
  */
157
  public function relistArticle($articleId)
158
+ {
159
+ return $this->republishArticle($articleId);
160
+ }
161
+
162
+ /**
163
+ * @param $articleId
164
+ * @return array
165
+ * @throws \Diglin\Ricardo\Exceptions\ExceptionAbstract
166
+ * @throws \Diglin\Ricardo\Exceptions\SecurityException
167
+ * @throws \Exception
168
+ */
169
+ public function republishArticle($articleId)
170
  {
171
  $antiforgery = $this->getServiceManager()->getSecurityManager()->getAntiforgeryToken();
172
+ return $this->_proceed('RepublishArticle', array('ArticleId' => $articleId, 'AntiforgeryToken' => $antiforgery));
173
  }
174
 
175
  /**
176
+ * @deprecated
177
  * @param UpdateArticleParameter $parameter
178
  * @return float
179
  */
180
  public function updateArticle(UpdateArticleParameter $parameter)
181
  {
182
+ return $this->modifyArticle($parameter);
 
183
  }
184
 
185
+ /**
186
+ * @param UpdateArticleParameter $parameter
187
+ * @return mixed
188
+ * @throws \Diglin\Ricardo\Exceptions\ExceptionAbstract
189
+ * @throws \Diglin\Ricardo\Exceptions\SecurityException
190
+ * @throws \Exception
191
+ */
192
+ public function modifyArticle(UpdateArticleParameter $parameter)
193
+ {
194
+ $result = $this->_proceed('ModifyArticle', $parameter);
195
+ return $result['ArticleFee'];
196
+ }
197
 
198
  /**
199
  * @param UpdateArticlePicturesParameter $parameter
lib/Diglin/Ricardo/Managers/Sell/Parameter/ArticleDeliveryParameter.php CHANGED
@@ -22,6 +22,10 @@ namespace Diglin\Ricardo\Managers\Sell\Parameter;
22
 
23
  use Diglin\Ricardo\Managers\ParameterAbstract;
24
 
 
 
 
 
25
  class ArticleDeliveryParameter extends ParameterAbstract
26
  {
27
  /**
22
 
23
  use Diglin\Ricardo\Managers\ParameterAbstract;
24
 
25
+ /**
26
+ * Class ArticleDeliveryParameter
27
+ * @package Diglin\Ricardo\Managers\Sell\Parameter
28
+ */
29
  class ArticleDeliveryParameter extends ParameterAbstract
30
  {
31
  /**
lib/Diglin/Ricardo/Managers/Sell/Parameter/ArticlePictureParameter.php CHANGED
@@ -22,6 +22,10 @@ namespace Diglin\Ricardo\Managers\Sell\Parameter;
22
 
23
  use Diglin\Ricardo\Managers\ParameterAbstract;
24
 
 
 
 
 
25
  class ArticlePictureParameter extends ParameterAbstract
26
  {
27
  /**
@@ -41,10 +45,16 @@ class ArticlePictureParameter extends ParameterAbstract
41
  */
42
  protected $_pictureIndex; // required
43
 
 
 
 
 
 
44
  protected $_requiredProperties = array(
45
  'pictureBytes',
46
  'pictureExtension',
47
- 'pictureIndex'
 
48
  );
49
 
50
  /**
@@ -100,4 +110,23 @@ class ArticlePictureParameter extends ParameterAbstract
100
  {
101
  return $this->_pictureIndex;
102
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  }
22
 
23
  use Diglin\Ricardo\Managers\ParameterAbstract;
24
 
25
+ /**
26
+ * Class ArticlePictureParameter
27
+ * @package Diglin\Ricardo\Managers\Sell\Parameter
28
+ */
29
  class ArticlePictureParameter extends ParameterAbstract
30
  {
31
  /**
45
  */
46
  protected $_pictureIndex; // required
47
 
48
+ /**
49
+ * @var string
50
+ */
51
+ protected $_pictureInBase64; // required
52
+
53
  protected $_requiredProperties = array(
54
  'pictureBytes',
55
  'pictureExtension',
56
+ 'pictureIndex',
57
+ 'pictureInBase64'
58
  );
59
 
60
  /**
110
  {
111
  return $this->_pictureIndex;
112
  }
113
+
114
+ /**
115
+ * @return string
116
+ */
117
+ public function getPictureInBase64()
118
+ {
119
+ return $this->_pictureInBase64;
120
+ }
121
+
122
+ /**
123
+ * @param string $pictureInBase64
124
+ * @return $this
125
+ */
126
+ public function setPictureInBase64($pictureInBase64)
127
+ {
128
+ $this->_pictureInBase64 = $pictureInBase64;
129
+ $this->setPictureBytes(null);
130
+ return $this;
131
+ }
132
  }
lib/Diglin/Ricardo/Managers/Sell/Parameter/DeletePlannedArticlesParameter.php CHANGED
@@ -65,11 +65,11 @@ class DeletePlannedArticlesParameter extends ParameterAbstract
65
  }
66
 
67
  /**
68
- * @param ClosePlannedArticleParameter $plannedArticle
69
  * @param bool $clear
70
  * @return $this
71
  */
72
- public function setArticles(ClosePlannedArticleParameter $plannedArticle = null, $clear = false)
73
  {
74
  if ($clear) {
75
  $this->_articles = array();
65
  }
66
 
67
  /**
68
+ * @param DeletePlannedArticleParameter $plannedArticle
69
  * @param bool $clear
70
  * @return $this
71
  */
72
+ public function setArticles(DeletePlannedArticleParameter $plannedArticle = null, $clear = false)
73
  {
74
  if ($clear) {
75
  $this->_articles = array();
lib/Diglin/Ricardo/Services/Search.php CHANGED
@@ -23,6 +23,10 @@ namespace Diglin\Ricardo\Services;
23
 
24
  use Diglin\Ricardo\Managers\Search\Parameter\GetCategoryBestMatchParameter;
25
 
 
 
 
 
26
  class Search extends ServiceAbstract
27
  {
28
  /**
@@ -36,6 +40,8 @@ class Search extends ServiceAbstract
36
  protected $_typeOfToken = self::TOKEN_TYPE_ANONYMOUS;
37
 
38
  /**
 
 
39
  * @param GetCategoryBestMatchParameter $getCategoryBestMatchParameter
40
  * @return array
41
  */
23
 
24
  use Diglin\Ricardo\Managers\Search\Parameter\GetCategoryBestMatchParameter;
25
 
26
+ /**
27
+ * Class Search
28
+ * @package Diglin\Ricardo\Services
29
+ */
30
  class Search extends ServiceAbstract
31
  {
32
  /**
40
  protected $_typeOfToken = self::TOKEN_TYPE_ANONYMOUS;
41
 
42
  /**
43
+ * Get Category Best Match
44
+ *
45
  * @param GetCategoryBestMatchParameter $getCategoryBestMatchParameter
46
  * @return array
47
  */
lib/Diglin/Ricardo/Services/Sell.php CHANGED
@@ -86,6 +86,7 @@ class Sell extends ServiceAbstract
86
  if (isset($data['AddArticlePicturesResult'])) {
87
  return $data['AddArticlePicturesResult'];
88
  }
 
89
  return false;
90
  }
91
 
@@ -149,6 +150,7 @@ class Sell extends ServiceAbstract
149
  if (isset($data['CloseArticleResult'])) {
150
  return $data['CloseArticleResult'];
151
  }
 
152
  return false;
153
  }
154
 
@@ -252,6 +254,7 @@ class Sell extends ServiceAbstract
252
  if (isset($data['DeletePlannedArticleResult'])) {
253
  return $data['DeletePlannedArticleResult'];
254
  }
 
255
  return false;
256
  }
257
 
@@ -292,6 +295,7 @@ class Sell extends ServiceAbstract
292
  if (isset($data['DeletePlannedArticlesResult']) && isset($data['DeletePlannedArticlesResult']['DeleteResults'])) {
293
  return $data['DeletePlannedArticlesResult']['DeleteResults'];
294
  }
 
295
  return false;
296
  }
297
 
@@ -326,34 +330,35 @@ class Sell extends ServiceAbstract
326
  * @return bool
327
  *
328
  * [0] => Array
329
- (
330
- [CoveredByPLP] =>
331
- [ListingFee] => 0
332
- [PromotionFees] => Array
333
- (
334
- [0] => Array
335
- (
336
- [PromotionFee] => 0
337
- [PromotionId] => 4194304
338
- )
339
-
340
- [1] => Array
341
- (
342
- [PromotionFee] => 0
343
- [PromotionId] => 8388608
344
- )
345
- [...] => ...
346
-
347
- )
348
-
349
- [TotalFee] => 5
350
- )
351
  */
352
  public function getArticlesFeeResult(array $data)
353
  {
354
  if (isset($data['GetArticlesFeeResult']) && isset($data['GetArticlesFeeResult']['ArticlesFee'])) {
355
  return $data['GetArticlesFeeResult']['ArticlesFee'];
356
  }
 
357
  return false;
358
  }
359
 
@@ -378,13 +383,57 @@ class Sell extends ServiceAbstract
378
  /**
379
  * Inserts an article or a planned article
380
  *
 
381
  * @param $insertArticleParameter
382
  * @return array
383
  */
384
  public function insertArticle(InsertArticleParameter $insertArticleParameter)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
385
  {
386
  return array(
387
- 'method' => 'InsertArticle',
388
  'params' => array('insertArticleParameter' => $insertArticleParameter->getDataProperties())
389
  );
390
  }
@@ -395,7 +444,7 @@ class Sell extends ServiceAbstract
395
  * The Ricardo API returns:
396
  * <pre>
397
  * {
398
- * "InsertArticleResult": {
399
  * "ArticleFee": [{
400
  * "ListingFee": "float"
401
  * "TotalFee": "float"
@@ -415,24 +464,65 @@ class Sell extends ServiceAbstract
415
  * @param array $data
416
  * @return array|bool
417
  */
418
- public function insertArticleResult(array $data)
419
  {
420
- if (isset($data['InsertArticleResult'])) {
421
- return $data['InsertArticleResult'];
422
  }
 
423
  return false;
424
  }
425
 
426
  /**
427
  * Inserts a list of articles or a planned articles. This method is currently not fully usable to external partners
428
  *
 
429
  * @param InsertArticlesParameter $insertArticlesParameter
430
  * @return array
431
  */
432
  public function insertArticles(InsertArticlesParameter $insertArticlesParameter)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
433
  {
434
  return array(
435
- 'method' => 'InsertArticles',
436
  'params' => array('insertArticlesParameter' => $insertArticlesParameter->getDataProperties())
437
  );
438
  }
@@ -443,7 +533,7 @@ class Sell extends ServiceAbstract
443
  * The Ricardo API returns:
444
  * <pre>
445
  * {
446
- * "InsertArticlesResult": {
447
  * "Results": [{
448
  * "ArticleFee": "float"
449
  * "ArticleId": "int"
@@ -459,11 +549,12 @@ class Sell extends ServiceAbstract
459
  * @param array $data
460
  * @return array|bool
461
  */
462
- public function insertArticlesResult(array $data)
463
  {
464
- if (isset($data['InsertArticlesResult']) && isset($data['InsertArticlesResult']['Results'])) {
465
- return $data['InsertArticlesResult']['Results'];
466
  }
 
467
  return false;
468
  }
469
 
@@ -488,9 +579,20 @@ class Sell extends ServiceAbstract
488
  /**
489
  * Inserts the preview converted classified.
490
  *
 
491
  * @param $insertPreviewConvertedClassifiedParameter
492
  */
493
  public function insertPreviewConvertedClassified($insertPreviewConvertedClassifiedParameter)
 
 
 
 
 
 
 
 
 
 
494
  {
495
  }
496
 
@@ -504,41 +606,91 @@ class Sell extends ServiceAbstract
504
  }
505
 
506
  /**
 
507
  * @param $parameters
508
  * @return array
509
  */
510
  public function relistArticle($parameters)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
511
  {
512
  $articleId = $parameters['ArticleId'];
513
  $antiforgeryToken = $parameters['AntiforgeryToken'];
514
 
515
  return array(
516
- 'method' => 'RelistArticle',
517
  'params' => array('relistArticleParameter' => array('ArticleId', $articleId, 'AntiforgeryToken' => $antiforgeryToken))
518
  );
519
  }
520
 
 
 
 
 
 
 
 
 
 
 
 
 
 
521
  /**
522
  * Relists the auction articles. This method is currently not fully usable to external partners
523
  *
524
  * @param array $articleIds
525
  * @return array
526
  */
527
- public function relistArticles($articleIds)
528
  {
529
  return array(
530
- 'method' => 'RelistArticles',
531
  'params' => array('relistArticlesParameter' => array('ArticleId', $articleIds))
532
  );
533
  }
534
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535
  /**
536
  * Relists the auction articles without modification. This method is currently not fully usable to external partners
537
  *
 
538
  * @param $relistArticlesWithoutModificationParameter
539
  */
540
  public function relistArticlesWithoutModification($relistArticlesWithoutModificationParameter)
541
  {
 
542
  }
543
 
544
  /**
@@ -547,6 +699,21 @@ class Sell extends ServiceAbstract
547
  * @param $relistArticleWithoutModificationParameter
548
  */
549
  public function relistArticleWithoutModification($relistArticleWithoutModificationParameter)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
550
  {
551
  }
552
 
@@ -598,13 +765,46 @@ class Sell extends ServiceAbstract
598
  /**
599
  * Updates the article.
600
  *
 
601
  * @param UpdateArticleParameter $updateArticleParameter
602
  * @return array
603
  */
604
  public function updateArticle(UpdateArticleParameter $updateArticleParameter)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
605
  {
606
  return array(
607
- 'method' => 'UpdateArticle',
608
  'params' => array('updateArticleParameter' => $updateArticleParameter->getDataProperties())
609
  );
610
  }
@@ -624,11 +824,12 @@ class Sell extends ServiceAbstract
624
  * @param array $data
625
  * @return bool|array
626
  */
627
- public function updateArticleResult(array $data)
628
  {
629
- if (isset($data['UpdateArticleResult'])) {
630
- return $data['UpdateArticleResult'];
631
  }
 
632
  return false;
633
  }
634
 
@@ -703,11 +904,22 @@ class Sell extends ServiceAbstract
703
  }
704
 
705
  /**
706
- * Updates the planned article.
707
  *
 
708
  * @param $updatePlannedArticleParameter
709
  */
710
  public function updatePlannedArticle($updatePlannedArticleParameter)
 
 
 
 
 
 
 
 
 
 
711
  {
712
  }
713
 
86
  if (isset($data['AddArticlePicturesResult'])) {
87
  return $data['AddArticlePicturesResult'];
88
  }
89
+
90
  return false;
91
  }
92
 
150
  if (isset($data['CloseArticleResult'])) {
151
  return $data['CloseArticleResult'];
152
  }
153
+
154
  return false;
155
  }
156
 
254
  if (isset($data['DeletePlannedArticleResult'])) {
255
  return $data['DeletePlannedArticleResult'];
256
  }
257
+
258
  return false;
259
  }
260
 
295
  if (isset($data['DeletePlannedArticlesResult']) && isset($data['DeletePlannedArticlesResult']['DeleteResults'])) {
296
  return $data['DeletePlannedArticlesResult']['DeleteResults'];
297
  }
298
+
299
  return false;
300
  }
301
 
330
  * @return bool
331
  *
332
  * [0] => Array
333
+ * (
334
+ * [CoveredByPLP] =>
335
+ * [ListingFee] => 0
336
+ * [PromotionFees] => Array
337
+ * (
338
+ * [0] => Array
339
+ * (
340
+ * [PromotionFee] => 0
341
+ * [PromotionId] => 4194304
342
+ * )
343
+ *
344
+ * [1] => Array
345
+ * (
346
+ * [PromotionFee] => 0
347
+ * [PromotionId] => 8388608
348
+ * )
349
+ * [...] => ...
350
+ *
351
+ * )
352
+ *
353
+ * [TotalFee] => 5
354
+ * )
355
  */
356
  public function getArticlesFeeResult(array $data)
357
  {
358
  if (isset($data['GetArticlesFeeResult']) && isset($data['GetArticlesFeeResult']['ArticlesFee'])) {
359
  return $data['GetArticlesFeeResult']['ArticlesFee'];
360
  }
361
+
362
  return false;
363
  }
364
 
383
  /**
384
  * Inserts an article or a planned article
385
  *
386
+ * @deprecated
387
  * @param $insertArticleParameter
388
  * @return array
389
  */
390
  public function insertArticle(InsertArticleParameter $insertArticleParameter)
391
+ {
392
+ return $this->createArticle($insertArticleParameter);
393
+ }
394
+
395
+ /**
396
+ * Get the article result data
397
+ *
398
+ * The Ricardo API returns:
399
+ * <pre>
400
+ * {
401
+ * "InsertArticleResult": {
402
+ * "ArticleFee": [{
403
+ * "ListingFee": "float"
404
+ * "TotalFee": "float"
405
+ * "PromotionFees": [{
406
+ * "PromotionFee": "float"
407
+ * "PromotionId": "int"
408
+ * }]
409
+ * }]
410
+ * "ArticleId": "int"
411
+ * "CarDealerArticleId": "int"
412
+ * "ErrorCodes": "int" ArticleErrors
413
+ * "PlannedArticleId": "int"
414
+ * }
415
+ * }
416
+ * </pre>
417
+ *
418
+ * @deprecated
419
+ * @param array $data
420
+ * @return array|bool
421
+ */
422
+ public function insertArticleResult(array $data)
423
+ {
424
+ return $this->createArticleResult($data);
425
+ }
426
+
427
+ /**
428
+ * Inserts an article or a planned article
429
+ *
430
+ * @param $insertArticleParameter
431
+ * @return array
432
+ */
433
+ public function createArticle(InsertArticleParameter $insertArticleParameter)
434
  {
435
  return array(
436
+ 'method' => 'CreateArticle',
437
  'params' => array('insertArticleParameter' => $insertArticleParameter->getDataProperties())
438
  );
439
  }
444
  * The Ricardo API returns:
445
  * <pre>
446
  * {
447
+ * "CreateArticleResult": {
448
  * "ArticleFee": [{
449
  * "ListingFee": "float"
450
  * "TotalFee": "float"
464
  * @param array $data
465
  * @return array|bool
466
  */
467
+ public function createArticleResult(array $data)
468
  {
469
+ if (isset($data['CreateArticleResult'])) {
470
+ return $data['CreateArticleResult'];
471
  }
472
+
473
  return false;
474
  }
475
 
476
  /**
477
  * Inserts a list of articles or a planned articles. This method is currently not fully usable to external partners
478
  *
479
+ * @deprecated
480
  * @param InsertArticlesParameter $insertArticlesParameter
481
  * @return array
482
  */
483
  public function insertArticles(InsertArticlesParameter $insertArticlesParameter)
484
+ {
485
+ return $this->createArticles($insertArticlesParameter);
486
+ }
487
+
488
+ /**
489
+ * Get the article result data
490
+ *
491
+ * The Ricardo API returns:
492
+ * <pre>
493
+ * {
494
+ * "CreateArticlesResult": {
495
+ * "Results": [{
496
+ * "ArticleFee": "float"
497
+ * "ArticleId": "int"
498
+ * "CarDealerArticleId": "int"
499
+ * "CorrelationKey": "int"
500
+ * "ErrorCodes": "int" ArticleErrors
501
+ * "ErrorCodesType": "int" @see https://ws.ricardo.ch/RicardoApi/documentation/html/T_Ricardo_Enums_Errors_ErrorList.htm
502
+ * "PlannedArticleId": "int"
503
+ * }]
504
+ * }
505
+ * </pre>
506
+ *
507
+ * @deprecated
508
+ * @param array $data
509
+ * @return array|bool
510
+ */
511
+ public function insertArticlesResult(array $data)
512
+ {
513
+ return $this->createArticlesResult($data);
514
+ }
515
+
516
+ /**
517
+ * Inserts a list of articles or a planned articles. This method is currently not fully usable to external partners
518
+ *
519
+ * @param InsertArticlesParameter $insertArticlesParameter
520
+ * @return array
521
+ */
522
+ public function createArticles(InsertArticlesParameter $insertArticlesParameter)
523
  {
524
  return array(
525
+ 'method' => 'CreateArticles',
526
  'params' => array('insertArticlesParameter' => $insertArticlesParameter->getDataProperties())
527
  );
528
  }
533
  * The Ricardo API returns:
534
  * <pre>
535
  * {
536
+ * "CreateArticlesResult": {
537
  * "Results": [{
538
  * "ArticleFee": "float"
539
  * "ArticleId": "int"
549
  * @param array $data
550
  * @return array|bool
551
  */
552
+ public function createArticlesResult(array $data)
553
  {
554
+ if (isset($data['CreateArticlesResult']) && isset($data['CreateArticlesResult']['Results'])) {
555
+ return $data['CreateArticlesResult']['Results'];
556
  }
557
+
558
  return false;
559
  }
560
 
579
  /**
580
  * Inserts the preview converted classified.
581
  *
582
+ * @deprecated
583
  * @param $insertPreviewConvertedClassifiedParameter
584
  */
585
  public function insertPreviewConvertedClassified($insertPreviewConvertedClassifiedParameter)
586
+ {
587
+ return $this->createPreviewConvertedClassified($insertPreviewConvertedClassifiedParameter);
588
+ }
589
+
590
+ /**
591
+ * Inserts the preview converted classified.
592
+ *
593
+ * @param $insertPreviewConvertedClassifiedParameter
594
+ */
595
+ public function createPreviewConvertedClassified($insertPreviewConvertedClassifiedParameter)
596
  {
597
  }
598
 
606
  }
607
 
608
  /**
609
+ * @deprecated
610
  * @param $parameters
611
  * @return array
612
  */
613
  public function relistArticle($parameters)
614
+ {
615
+ return $this->republishArticle($parameters);
616
+ }
617
+
618
+ /**
619
+ * Relists the auction articles. This method is currently not fully usable to external partners
620
+ *
621
+ * @deprecated
622
+ * @param array $articleIds
623
+ * @return array
624
+ */
625
+ public function relistArticles($articleIds)
626
+ {
627
+ return $this->republishArticles($articleIds);
628
+ }
629
+
630
+ /**
631
+ * @param $parameters
632
+ * @return array
633
+ */
634
+ public function republishArticle($parameters)
635
  {
636
  $articleId = $parameters['ArticleId'];
637
  $antiforgeryToken = $parameters['AntiforgeryToken'];
638
 
639
  return array(
640
+ 'method' => 'RepublishArticle',
641
  'params' => array('relistArticleParameter' => array('ArticleId', $articleId, 'AntiforgeryToken' => $antiforgeryToken))
642
  );
643
  }
644
 
645
+ /**
646
+ * @param array $data
647
+ * @return bool
648
+ */
649
+ public function republishArticleResult(array $data)
650
+ {
651
+ if (isset($data['RepublishArticleResult'])) {
652
+ return $data['RepublishArticleResult'];
653
+ }
654
+
655
+ return false;
656
+ }
657
+
658
  /**
659
  * Relists the auction articles. This method is currently not fully usable to external partners
660
  *
661
  * @param array $articleIds
662
  * @return array
663
  */
664
+ public function republishArticles($articleIds)
665
  {
666
  return array(
667
+ 'method' => 'RepublishArticles',
668
  'params' => array('relistArticlesParameter' => array('ArticleId', $articleIds))
669
  );
670
  }
671
 
672
+ /**
673
+ * @param array $data
674
+ * @return bool
675
+ */
676
+ public function republishArticlesResult(array $data)
677
+ {
678
+ if (isset($data['RepublishArticlesResult'])) {
679
+ return $data['RepublishArticlesResult'];
680
+ }
681
+
682
+ return false;
683
+ }
684
+
685
  /**
686
  * Relists the auction articles without modification. This method is currently not fully usable to external partners
687
  *
688
+ * @deprecated
689
  * @param $relistArticlesWithoutModificationParameter
690
  */
691
  public function relistArticlesWithoutModification($relistArticlesWithoutModificationParameter)
692
  {
693
+ return $this->republishArticleWithoutModification($relistArticlesWithoutModificationParameter);
694
  }
695
 
696
  /**
699
  * @param $relistArticleWithoutModificationParameter
700
  */
701
  public function relistArticleWithoutModification($relistArticleWithoutModificationParameter)
702
+ {
703
+ return $this->republishArticlesWithoutModification($relistArticleWithoutModificationParameter);
704
+ }
705
+
706
+ /**
707
+ * @param $relistArticlesWithoutModificationParameter
708
+ */
709
+ public function republishArticleWithoutModification($relistArticlesWithoutModificationParameter)
710
+ {
711
+ }
712
+
713
+ /**
714
+ * @param $relistArticleWithoutModificationParameter
715
+ */
716
+ public function republishArticlesWithoutModification($relistArticleWithoutModificationParameter)
717
  {
718
  }
719
 
765
  /**
766
  * Updates the article.
767
  *
768
+ * @deprecated
769
  * @param UpdateArticleParameter $updateArticleParameter
770
  * @return array
771
  */
772
  public function updateArticle(UpdateArticleParameter $updateArticleParameter)
773
+ {
774
+ return $this->modifyArticle($updateArticleParameter);
775
+ }
776
+
777
+ /**
778
+ * Get the article result data
779
+ *
780
+ * The Ricardo API returns:
781
+ * <pre>
782
+ * {
783
+ * "UpdateArticleResult": {
784
+ * "ArticleFee": "float"
785
+ * }
786
+ * }
787
+ * </pre>
788
+ *
789
+ * @deprecated
790
+ * @param array $data
791
+ * @return bool|array
792
+ */
793
+ public function updateArticleResult(array $data)
794
+ {
795
+ return $this->modifyArticleResult($data);
796
+ }
797
+
798
+ /**
799
+ * Updates the article.
800
+ *
801
+ * @param UpdateArticleParameter $updateArticleParameter
802
+ * @return array
803
+ */
804
+ public function modifyArticle(UpdateArticleParameter $updateArticleParameter)
805
  {
806
  return array(
807
+ 'method' => 'ModifyArticle',
808
  'params' => array('updateArticleParameter' => $updateArticleParameter->getDataProperties())
809
  );
810
  }
824
  * @param array $data
825
  * @return bool|array
826
  */
827
+ public function modifyArticleResult(array $data)
828
  {
829
+ if (isset($data['ModifyArticleResult'])) {
830
+ return $data['ModifyArticleResult'];
831
  }
832
+
833
  return false;
834
  }
835
 
904
  }
905
 
906
  /**
907
+ * Update the planned article.
908
  *
909
+ * @deprecated
910
  * @param $updatePlannedArticleParameter
911
  */
912
  public function updatePlannedArticle($updatePlannedArticleParameter)
913
+ {
914
+ return $this->modifyPlannedArticle($updatePlannedArticleParameter);
915
+ }
916
+
917
+ /**
918
+ * Modify/Update the planned article.
919
+ *
920
+ * @param $updatePlannedArticleParameter
921
+ */
922
+ public function modifyPlannedArticle($updatePlannedArticleParameter)
923
  {
924
  }
925
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>diglin_ricento</name>
4
- <version>1.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0">OSL v3.0</license>
7
  <channel>community</channel>
@@ -38,7 +38,20 @@
38
  &lt;p&gt;With around 700,000 current offers (auctions and fixed price), 2.5 million brand-name articles on &lt;a href="http://www.ricardoshops"&gt;ricardoshops&lt;/a&gt;.ch, around 100,000 vehicles plus 35,000 parts and accessories on &lt;a href="http://www.autoricardo.ch"&gt;autoricardo.ch&lt;/a&gt; and over 2.3 million members, ricardo.ch is the largest online marketplace in Switzerland. Every three minutes somebody buys an article on &lt;a href="http://www.ricardo.ch"&gt;ricardo.ch&lt;/a&gt; using a mobile device. ricardo.ch AG employs over 140 people in Switzerland and is headquartered in Zug.&lt;/p&gt;&#xD;
39
  &lt;h2&gt;About Diglin&lt;/h2&gt;&#xD;
40
  &lt;p&gt;&lt;a href="http://www.diglin.com"&gt;Diglin&lt;/a&gt; is the Swiss eCommerce Agency per excellence, realizing your eCommerce project with success. It will accompany along the whole life of your eCommerce project at any levels: conception, realization, design, marketing, logistic, data treatment and management, resource optimization, cost efficiency, increase in turnover, etc. Diglin concentrates its activities mainly with the solutions Magento (eCommerce), OroCRM (CRM) and Akeneo (PIM) and work with its partners highly qualified to provide you the best solutions regarding your needs. &lt;/p&gt;</description>
41
- <notes>## Version 1.2.0&#xD;
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  - FEATURE: add column into customer (ricardo username) and order grid (is ricardo order?). Configurable to show them or not from configuration page of the extension&#xD;
43
  - FIX: amount of products to get fees is limited to 200 on ricardo.ch side. Get fees even if a shop owner has more than 200 article in the product list&#xD;
44
  &#xD;
@@ -226,9 +239,9 @@
226
  - be2b77a Update readme file&#xD;
227
  - 9384e3c Update doc</notes>
228
  <authors><author><name>diglin</name><user>diglin</user><email>sly@diglin.com</email></author></authors>
229
- <date>2015-05-18</date>
230
- <time>11:02:12</time>
231
- <contents><target name="magecommunity"><dir name="Diglin"><dir name="Ricento"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Source"><file name="Heading.php" hash="b433ef94dec29580215fc43109ee8f8c"/><file name="Hint.php" hash="b7a7ba331d22590f59bfe8281241a4f0"/></dir></dir><dir name="Dashboard"><file name="Account.php" hash="8724a08f3683b47aaa2f72496cc70b6e"/><file name="Banner.php" hash="342cbe73ba3b32f9bdc8313149ec931a"/><file name="Bestsellers.php" hash="a9432528b536631a678319e82afeeeec"/><file name="Lifetime.php" hash="e3a70e02e94f980f9d1aaf0ecf9a20bb"/><file name="News.php" hash="6ee052d661649e532b9d1ca4678a572a"/><dir name="Renderer"><file name="Price.php" hash="0fc32c2882a63176370bef21733e9e21"/></dir><file name="Turnover.php" hash="5e6865955e7a9698593a53fec3726676"/></dir><dir name="Form"><dir name="Element"><dir name="Checkboxes"><file name="Extensible.php" hash="bc4c39a051f7a159f5e23dff34ad811d"/></dir><dir name="Fieldset"><file name="Inline.php" hash="292183da97b985cecc1b6d1ce1ee4a35"/></dir><dir name="Radios"><file name="Extensible.php" hash="0bd7bcc853668d572fa21be57bb47575"/></dir></dir></dir><dir name="Log"><dir name="Listing"><file name="Grid.php" hash="6d8bf3d0cbeb07df6698ce5e3cc6da61"/></dir><dir name="Sync"><dir name="Grid"><dir name="Renderer"><file name="Progress.php" hash="2c641830c3db9983ea8e43251f72e907"/><file name="Title.php" hash="329af6b8bede66748d82b85524ceae52"/></dir></dir><file name="Grid.php" hash="ed1b6b85b7d94acf4327e2975a953742"/></dir><file name="Tabs.php" hash="e08d00e946c5007c767757d060f2cc6d"/></dir><file name="Log.php" hash="f08554f883e53cc040248edd7118bd4f"/><dir name="Notifications"><file name="Default.php" hash="167bfaa55e28c709dbf3697d7830a71a"/><file name="Expiration.php" hash="df67759b72214cd362b0db736b585859"/></dir><dir name="Page"><file name="Menu.php" hash="0a6dde8103fb1444621ccdf484957c02"/></dir><dir name="Products"><dir name="Category"><file name="Children.php" hash="307e037abc251848b0694b3529edfbfc"/><dir name="Form"><dir name="Renderer"><file name="Categories.php" hash="76c3af26e9c3aa7c3d9f09d941997d57"/><file name="Mapping.php" hash="577e4fc684f8939deba30eb67dbd174c"/></dir></dir><dir name="Mapping"><file name="Tree.php" hash="524d1d3387fbaa130552aca4e0591598"/></dir><file name="Mapping.php" hash="cc5b960ad5aa5a25380435eccb157856"/><dir name="Tree"><file name="Categories.php" hash="515975899617d335d6976e27ef7b573d"/><file name="Form.php" hash="d81bbe3285b496dc3c14625aa9b91e03"/></dir><file name="Tree.php" hash="8aa9c622715b021a8e857410b881b68c"/></dir><dir name="Listing"><file name="Confirmation.php" hash="cdb2ceca5b00a34d5a947c91ca722cd6"/><dir name="Edit"><file name="Form.php" hash="e1a9fe7cab032a32ca3407a76ce7fbee"/><dir name="Renderer"><file name="Article.php" hash="cf0e96bc078ab23d5641f6f2022749c8"/><file name="Configured.php" hash="4660b7102533fa42a83eb37603cc76a7"/><file name="Customoptions.php" hash="64d5d9a0b2fb3a97145cee69eda09e0c"/><file name="Inventory.php" hash="d31d8c271abb1a78f3699064aaa506dc"/><file name="Name.php" hash="bb38f3924522574e64ba6e811ff46450"/><file name="Price.php" hash="b6112891273ff496374b2778227b4143"/><file name="Status.php" hash="b114cd85e41eca64fe57a6ff51d5ee43"/></dir><dir name="Tabs"><file name="General.php" hash="14d287a2fc7ff8913697be143f79a367"/><dir name="Products"><file name="Add.php" hash="13e1ebc227ba3518b9ec3bb600acd83c"/><file name="Massaction.php" hash="e9abc1d73fee5e1bb85569a80f37b9e5"/></dir><file name="Products.php" hash="33ffa7e18f36d06801bda306a477f563"/><file name="Rules.php" hash="7b913d102970f46fb8db6ec409322d7c"/><file name="Selloptions.php" hash="111b94ee6039995882b30f29ccbce570"/></dir><file name="Tabs.php" hash="6c3df947696a88a2509cfcf25a28c38b"/></dir><file name="Edit.php" hash="3218bc52a42c197113e595e09bf15623"/><dir name="Form"><file name="Abstract.php" hash="aa96a74bc83b7dae21a982812eb6fd90"/></dir><dir name="Grid"><dir name="Renderer"><file name="Status.php" hash="842be30b0586aa7481c91bd68928b955"/><file name="Total.php" hash="9570d3f5b50c043c0444d5fb3411f6f2"/></dir></dir><file name="Grid.php" hash="1d5c9ccc35e37b036754f41e950deda1"/><dir name="Item"><dir name="Edit"><file name="Form.php" hash="780650cb73819b55b355fe01119f703c"/><dir name="Tabs"><file name="Rules.php" hash="f8488f76c14247e25a61da9b03df0593"/><file name="Selloptions.php" hash="d4613fae72dd1fe3c68bff8419a82750"/></dir><file name="Tabs.php" hash="5d0781303281ae745d3609f907bd19d2"/></dir><file name="Edit.php" hash="b6ee4c68d4cd7732cfe0cdb3c488409f"/><file name="Preview.php" hash="3389aca73aff4caff4ac9ea1084553b0"/></dir><file name="Log.php" hash="039a8bce6ee15ad9c49eb0d427c55c83"/><dir name="New"><file name="Form.php" hash="38ab04ded807490619a0e3b1cb75c9e0"/></dir><file name="New.php" hash="59eea06c9b8ec22162c3fcaeba2933e1"/></dir><file name="Listing.php" hash="8d604c1f0dab741cef0a06cb9065cdbc"/></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Button.php" hash="67d754bed74b6389355d554b255e7488"/></dir></dir></dir></dir></dir><dir name="Payment"><file name="Info.php" hash="c63a717a400752ec569657d2cd418195"/></dir><file name=".DS_Store" hash="7c6c35c12015d228cb2a17ed54b16f0d"/></dir><dir name="Controller"><dir name="Adminhtml"><file name="Action.php" hash="cc992630b53816a388b8294775d27265"/><dir name="Products"><file name="Listing.php" hash="cf5edd43dc606d6a4621c8a1fd92f195"/></dir></dir></dir><file name="Exception.php" hash="93c9bde391933089d1e6632cea5ad786"/><dir name="Helper"><file name="Api.php" hash="67ae3a1cc9a3a6ba9db34ed327865ae6"/><dir name="Dashboard"><file name="Turnover.php" hash="eda721699f2e5cf8e298e0024a63a545"/></dir><file name="Data.php" hash="3988fc82a1d0b6400f03d7a4fa21c227"/><file name="Image.php" hash="f7a1b6113d68cad54a56b5054f3adcaf"/><file name="Price.php" hash="ef6cb7106ba52582621e2a59de2553e4"/><file name="Support.php" hash="3cca6b96cc057332d86dca6c41822eba"/><file name="Tools.php" hash="13c923ae2c56e8305e481cb27570212d"/></dir><dir name="Model"><dir name="Api"><dir name="Services"><file name="Abstract.php" hash="d0c76c198a2c69c199e726da03abc7a6"/><file name="Customer.php" hash="d500e9e9035ffd8500407611f6796ad9"/><file name="Search.php" hash="d40fd404bfb3a2d5de9d6020df14b483"/><file name="Security.php" hash="d5f1d425155e4749344850e7b09feb22"/><file name="Sell.php" hash="8b4476223aa515032bf311da5c4c548f"/><file name="Selleraccount.php" hash="c0d31d32fee8b7c6347b81202a1ba0e5"/><file name="System.php" hash="7c20e49754e5e93503fc3ef7e4918dc8"/></dir><file name="Token.php" hash="a4145e890cafbd223fa42ba5b477c025"/></dir><dir name="Config"><dir name="Source"><file name="Abstract.php" hash="d671ca4f2f26f145f5fad2e30b532124"/><file name="Categories.php" hash="f982ceecede3d42547a08e6a36f49218"/><file name="Languages.php" hash="2c03657ebf714148b73cb3f15ef4488c"/><dir name="Products"><dir name="Listing"><file name="Log.php" hash="ba3a7d1e422755cd6739bed8820066c0"/><file name="Status.php" hash="170990ec2272e76863bbdc88be6a023b"/></dir></dir><dir name="Rules"><file name="Payment.php" hash="4d14509c99fa3c4fc26037b246f78265"/><dir name="Shipping"><file name="Availability.php" hash="f97891bf6fdf0765d0289c43bb457a97"/><file name="Calculation.php" hash="912f16d303a9b401d1de9d37296dde0a"/><file name="Packages.php" hash="d4ce5652ae2a80eeb8839290dfb64ee6"/></dir><file name="Shipping.php" hash="e66853a3ea9b51a0900fdadba935ae42"/></dir><dir name="Sales"><file name="Currency.php" hash="b07535355281a36f3b7e358d23a77e15"/><file name="Days.php" hash="5643dd61f80ccc52cbe29e75f18df2d9"/><dir name="Order"><file name="Status.php" hash="a3718bb7ab59b4d60748dee241888651"/></dir><dir name="Price"><file name="Method.php" hash="020a8e8d0d9d35802ea88c0028af4673"/><file name="Source.php" hash="94c5e4b5eb86ced80e5412159e6cf0f4"/></dir><dir name="Product"><dir name="Condition"><file name="Source.php" hash="14849df28b52facc5d91f462e9a90781"/></dir><file name="Condition.php" hash="32faa3b36d1b7de9577798578152d044"/></dir><file name="Promotion.php" hash="dfd838cfe50880d8d2facbf3b062b398"/><file name="Reactivation.php" hash="33d9dd75eeb119eb3b05bbb4dda8e432"/><file name="Template.php" hash="ccffc7632cd03d87f0245cd801d0bae5"/><file name="Type.php" hash="6f545897bbe8b99d5b30e4102279b827"/><file name="Warranty.php" hash="8762d38677d82bc8048e3d5d88b36eae"/></dir><file name="Status.php" hash="813afb1e443192b1d6a7d9937e56cafd"/><file name="Store.php" hash="6930c1537e4ebf98885d5c333bec3ffa"/><dir name="Sync"><file name="Progress.php" hash="d0430a73504085929ba5f8a3e867da07"/><file name="Status.php" hash="f4b8e72c905175730b3d566dee80ade6"/><file name="Type.php" hash="bafd71290733c7c480595fb61ec81227"/></dir><file name="Watermark.php" hash="75b4bb2d4e63e970483ce3043ca33a7b"/><file name="Website.php" hash="c0168510dc5252a0689416959882136b"/></dir></dir><file name="Cron.php" hash="a85f45baff623088bb1138daa3b42a2b"/><dir name="Dispatcher"><file name="Abstract.php" hash="98cb9a5193901147b625a928be4a089c"/><dir name="Check"><file name="List.php" hash="6b9eef4d652debf6be1b333b73b737a0"/></dir><file name="Closed.php" hash="95bba1d63f07d9aa568a25cc38a45017"/><file name="List.php" hash="b13bea7fa0aaa4bbe69eb6e09d7037a4"/><file name="Order.php" hash="cf04e621f997703459a0c7ee8a673b74"/><file name="Stop.php" hash="b825e86b920e1f3d4863a5e5c10a6f80"/><dir name="Sync"><file name="List.php" hash="eb4cc8966d896098fa452a917b0d41e6"/></dir></dir><file name="Dispatcher.php" hash="d00fda597c8a294d6d133aceb0f7c922"/><dir name="Entity"><dir name="Attribute"><dir name="Source"><file name="Conditions.php" hash="1223272c226b7bf7d1c6c61f27ef687e"/></dir></dir></dir><file name="Feed.php" hash="fecf4fead5bf6ab0742a8b8b2cb39dea"/><file name="Filter.php" hash="ec774cc9129c39ca4b1daf39eff0e59d"/><file name="Observer.php" hash="76caf791bd0fb45786fd341eccb31355"/><dir name="Products"><dir name="Category"><file name="Mapping.php" hash="b6df1431d7310759e5be17f29eb10df0"/></dir><file name="Category.php" hash="642f0520f549d520e9050a0286a56358"/><dir name="Listing"><dir name="Item"><file name="Product.php" hash="c64d6d91f1ef3f89b7fdbb3f19f50973"/></dir><file name="Item.php" hash="2d1728f3d266b5801af6334ef0b17b82"/><file name="Log.php" hash="992e843bdfd54aeac481cf6b2c678dbc"/></dir><file name="Listing.php" hash="8877ce70cb6ddb612e2f25ccfc3092c3"/></dir><dir name="Resource"><dir name="Api"><dir name="Token"><file name="Collection.php" hash="d2ab663440e27258841be3cf4a357a70"/></dir><file name="Token.php" hash="9899e9aa48e2ee7d416e840d575fff47"/></dir><dir name="Products"><dir name="Listing"><file name="Collection.php" hash="19b8f5d9d0107c897151d91e0cbae08e"/><dir name="Item"><file name="Collection.php" hash="c1d27c28e0c52f6f15641fe90cf2fba8"/></dir><file name="Item.php" hash="450a69ddd9023a40d1431f4a5c93a7db"/><dir name="Log"><file name="Collection.php" hash="c0b02c61246b76a31f2673931d90e985"/></dir><file name="Log.php" hash="514311bff0eee5b00e775c8b59b8b5a1"/></dir><file name="Listing.php" hash="450a3122ecd268a8714f90d06bd01328"/></dir><dir name="Rule"><file name="Collection.php" hash="9c35a937efb27fe3fd57616621035ceb"/></dir><file name="Rule.php" hash="2ec8533cbc357e2a204dcf6bcbdb2d88"/><dir name="Sales"><dir name="Options"><file name="Collection.php" hash="fbc1af66e9ce3c33f47cab4853d5bd3e"/></dir><file name="Options.php" hash="dbb7e3ecf2c1716cdbbc8fa81b25bdda"/><dir name="Transaction"><file name="Collection.php" hash="f661980fd6a907df331cd7df1f211dd0"/></dir><file name="Transaction.php" hash="f81eb7d223ab9357598199150c1281a2"/></dir><dir name="Sync"><file name="Abstract.php" hash="15030d2414b0ad5dc99b56cd656f92e8"/><dir name="Job"><file name="Collection.php" hash="b9bd2b8a3a7271524e65898a5f1fbd68"/><dir name="Listing"><file name="Collection.php" hash="a713a5910489912448c85a9987635a45"/></dir><file name="Listing.php" hash="44ec78a770948d9504c1138ce1f41fe1"/></dir><file name="Job.php" hash="a7496261d34501fc9a5c56a87110c688"/></dir></dir><file name="Rule.php" hash="4ff575a44898a6b63cdb22dc1c3bb180"/><dir name="Sales"><dir name="Method"><file name="Payment.php" hash="9ba10f1ceb6f4a97cb02a852afbb7e15"/><file name="Shipping.php" hash="2c7a63fe51d57deaf2cbc9c6ede6099b"/></dir><file name="Options.php" hash="d6bb5ab7343e79f2341113b8b6a123d0"/><dir name="Order"><file name="Create.php" hash="fa28733d72ddc214510f64f559189bf3"/><file name="Exception.php" hash="74d31df9035a6145563b25e9a5b0324b"/></dir><file name="Transaction.php" hash="81133f876c4988ebcf89f9bad6a19cd3"/></dir><file name="SplAutoloader.php" hash="39c58e1f9e4221d222960b801f9367e3"/><dir name="Sync"><file name="Abstract.php" hash="fc6ac3f307ea104c66fe4e758dd3a4a9"/><dir name="Job"><file name="Listing.php" hash="593875bf5d4d5588b684e39d833779b7"/></dir><file name="Job.php" hash="2374eb34968c83e0dde1b8aa684419f2"/></dir><dir name="Validate"><dir name="Products"><file name="Item.php" hash="873052730fad87d240b60070d2be7db0"/></dir><dir name="Rules"><file name="Methods.php" hash="9dcfc409d29f8eeb301c109212f1956e"/></dir><dir name="Sales"><file name="Increment.php" hash="1f92ec9c6ca26d34bdb3981e777bda14"/></dir></dir></dir><dir name="Test"><dir name="Model"><file name="Feed.php" hash="21c43e7f00928e1679a51ba1a77f0802"/><dir name="Rule"><dir name="Validate"><dir name="expectations"><file name="testPaymentMethodCombinations.yaml" hash="c1070f1ae555a8c32a7761980e589857"/></dir><dir name="providers"><file name="testPaymentMethodCombinations.yaml" hash="0dfd5c1d335e10540607a391b33a9a2c"/></dir></dir><file name="Validate.php" hash="08260abb9a0bd685da4097916dfddc31"/></dir><dir name="Sales"><dir name="Validate"><dir name="Increment"><dir name="expectations"><file name="testStartPriceIncrementCombination.yaml" hash="15ffe7bd8373cda25aed179c08171881"/></dir><dir name="providers"><file name="testStartPriceIncrementCombination.yaml" hash="345726c8c358be678a93c38fbff504dc"/></dir></dir><file name="Increment.php" hash="e32cd91e3f683e5300cbb91ad6f2f093"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AccountController.php" hash="384f2a7243924800fec9c10fcd9c912d"/><file name="ApiController.php" hash="9a1c834f6089fc6a027e470a915e5bbd"/><file name="DashboardController.php" hash="7f8935c4ca61e3b06181eec134d4649a"/><file name="IndexController.php" hash="e54b2a0a6e0e6ef898a22840683825dc"/><file name="LogController.php" hash="2102931b5793049ca3878b5767898e6a"/><dir name="Products"><file name="CategoryController.php" hash="a40797fa2b687890099b4b52725e4337"/><dir name="Listing"><file name="ItemController.php" hash="6348c7d28a736ed54228864f70544e20"/></dir><file name="ListingController.php" hash="0b2d712157c077e6f2a28f63c760cde0"/></dir><file name="SupportController.php" hash="3bfca97a48b6f81fddd30518ef241962"/><file name="SyncController.php" hash="77315fd98363dab57a60bdd7b2e85c87"/></dir></dir><dir name="data"><dir name="ricento_setup"><file name="data-install-1.0.0.php" hash="738f1d059e3968daea8592615106c7cf"/><file name="data-upgrade-1.0.18-1.1.0.php" hash="7f4480a5e13d64529e87219bc7f3348e"/><file name="data-upgrade-1.1.3-1.1.4.php" hash="3abe85a002f54038dfd8fe14902f8fb1"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="48d0016b44d8f0851094ecfff462541e"/><file name="config.xml" hash="53d3c275708aede0549d7a7c7891d552"/><file name="jstranslator.xml" hash="3a4a6307012f9660f925863659b38a2f"/><file name="system.xml" hash="8eccb649f84ee7d0423714c6a6da45f7"/><file name="uninstall.txt" hash="660b44580246f818f8e22f4c5a530c9b"/></dir><dir name="sql"><dir name="ricento_setup"><file name="install-1.0.0.php" hash="bc9f3b05ae68e0d8899a066384566801"/><file name="uninstall.php" hash="d0e2d68583a950374796b1d817c2958f"/><file name="upgrade-1.0.18-1.1.0.php" hash="fcf5dae1df75bbd2bca9193eef430d75"/><file name="upgrade-1.0.8-1.0.9.php" hash="47e0ce995ae6d7aff77245cbf05d0832"/><file name="upgrade-1.1.2-1.1.3.php" hash="c0c6c88441cd7aa216b04b512f4a44bc"/><file name="upgrade-1.1.3-1.1.4.php" hash="bc6aedfbbaf0cb942820579eecc6b912"/></dir><file name=".DS_Store" hash="e19b211e98c0ca4109b2266d2af007cf"/></dir><file name=".DS_Store" hash="8567bf32d443e4f6be638c2b520c2edb"/></dir></dir></target><target name="magelib"><dir name="Diglin"><dir name="Ricardo"><file name="Api.php" hash="134fa85c9b0103979ad93ab67250c5f0"/><dir name="Composer"><file name="Magento.php" hash="2b1396d290496bd8e744d6d5b0be797e"/></dir><file name="Config.php" hash="1045568136c433270ddc178025d96a87"/><dir name="Core"><file name="ApiInterface.php" hash="c5a36ca69d27d76d913a2c4cb2d5876e"/><file name="ConfigInterface.php" hash="cd5d8d9eb5e0dd6946d4caf63f0cf6b2"/><file name="Helper.php" hash="4695227c2c6ddb099559fd688b54aa60"/></dir><dir name="Enums"><file name="AbstractEnums.php" hash="8e401abbc33bdbab34223bb3f4950166"/><dir name="Article"><file name="ArticlesTypes.php" hash="e13b730e4c5656091305c6e8a1031b8f"/><file name="CloseListStatus.php" hash="d67f65e3de13cf6747e6e10bc0c1bb21"/><file name="InternalReferenceType.php" hash="6c8eddab52eea86efb142999f76e7b65"/><file name="PromotionCode.php" hash="67c1026f8d2e31e02083c99bdc1250b3"/><file name="Warranty.php" hash="ec403c6fe606572fdb7e92eda4e2eff0"/></dir><file name="ArticleErrors.php" hash="705927167cdc08eb4ada7d7ce055af22"/><dir name="Customer"><file name="ArticleTypeFilter.php" hash="1ae6e485167cb19da3eadd12efe9cc42"/><file name="OpenArticlesSortBy.php" hash="7b73af00d1a0af79ffa33d0281d2af28"/><file name="PaidStatusFilter.php" hash="b6ff931bebcfa37a09a5cab04fdb7448"/><file name="ShippedStatusFilter.php" hash="c906c8a60ea6e91f68bf1015dce18177"/><file name="SoldArticlesSortBy.php" hash="80c3241b09c3f61a1711a449404667e0"/></dir><file name="CustomerErrors.php" hash="38588fb9c5a425d490593dc5f23eb2d7"/><file name="GeneralErrors.php" hash="65c4369f521e99dfe8f20f0b0b5d67a3"/><file name="PaymentMethods.php" hash="4bfcb7bc7ab1181cb8cc544f050b5d6b"/><file name="PictureErrors.php" hash="ad7e4888ec4b8b43ab70b2154de4adc0"/><file name="PictureExtension.php" hash="9f76c645e57efed13f52d74c23a687e6"/><file name="SearchErrors.php" hash="f16b01e7d62b76734a38776e546beb7f"/><file name="SecurityErrors.php" hash="cb6112e33a4d8fb318e84e028181838b"/><dir name="System"><file name="CategoryArticleType.php" hash="8b680d1791cafec2e43907b144ad63c8"/><file name="CategoryBrandingFilter.php" hash="c7eb8c9d61adb8cc76ae3c47638fcfab"/><file name="LanguageCode.php" hash="6998c880c44fbdbe3b60321818976b9a"/><file name="LanguageId.php" hash="bcef589026b025591b4fa6bb9328fbbd"/></dir><file name=".DS_Store" hash="cb1fb86d332d6cf020d9991723302c24"/></dir><dir name="Exceptions"><file name="ArticleException.php" hash="b5290b26c6e711e6f1074f9d6687c066"/><file name="CurlException.php" hash="b1fa36bf6f663f942ec444dcc1e75044"/><file name="CustomerException.php" hash="d011aad98f970733f7eefe369f53fee6"/><file name="ExceptionAbstract.php" hash="8c868ba9a1a200aae3b59240b01faa70"/><file name="GeneralException.php" hash="18d42b47fd69a9b427cb4427a5d56e56"/><file name="PictureException.php" hash="ba3f6cc087f6b0103ecc96b4357ab0ac"/><file name="SearchException.php" hash="ecd9902786eecb50414d3dd7e01b3492"/><file name="SecurityException.php" hash="b4b500a3f2abdc3bc957284d5fbc42a9"/><file name="TechnicalException.php" hash="fdad217159c2c995ef4415e6f6383456"/></dir><dir name="Managers"><file name="Customer.php" hash="e2b3241594fecb5ef944466b34c8fbfe"/><file name="ManagerAbstract.php" hash="13dca083592bd0651f06a03fe9dd589a"/><file name="ParameterAbstract.php" hash="e9725c5915f48d375bef33f377247083"/><dir name="Search"><dir name="Parameter"><file name="GetCategoryBestMatchParameter.php" hash="14619ec6f6dc3e45d68930189cd27ec9"/></dir></dir><file name="Search.php" hash="3c8d6d52031bf00a9eeb672b291f43ae"/><file name="Security.php" hash="b9dd72f0724ec454d023b4767b687116"/><dir name="Sell"><dir name="Parameter"><file name="AddArticlePicturesParameter.php" hash="8e607c9579f951f94a9bed199acc1145"/><file name="AppendArticleDescriptionParameter.php" hash="f38f51ff97640e024a4c08cc6eeab652"/><file name="AppendDescriptionParameter.php" hash="8140c7d52d1f33dbe621e889251b923f"/><file name="ArticleDeliveryParameter.php" hash="538e9e573bc7b81083e3febc8e325cf5"/><file name="ArticleDescriptionParameter.php" hash="98fef4f221b9f3a11ee9078bfd5116f0"/><file name="ArticleInformationParameter.php" hash="9900793d70875a80ca47d5d3e98691a9"/><file name="ArticleInternalReferenceParameter.php" hash="84cf8bcf50e6dda593b4f9570e1f6ed9"/><file name="ArticlePictureParameter.php" hash="aa7c36ccb2144513a9ea7b27966d2f3b"/><file name="BaseInsertArticleWithTrackingParameter.php" hash="5fdeb6656f1b0ebdf9fb76c8ba5973df"/><file name="CloseArticleParameter.php" hash="7f0a426ba4b277d9c02be87b5725cc45"/><file name="CloseArticlesParameter.php" hash="cbdc9f2045c7e1b440b5252d63717947"/><file name="ClosePlannedArticleParameter.php" hash="5ee0ee9a0b79098ee38bf0a4f8420551"/><file name="DeletePlannedArticleParameter.php" hash="f86cb01ff7cb1b91ece3191cde3cf6e1"/><file name="DeletePlannedArticlesParameter.php" hash="5b094b5537aad744945877c2885cde3f"/><file name="GetArticleFeeParameter.php" hash="926f8960ce9162686d1eee03002ef5ca"/><file name="GetArticlesFeeParameter.php" hash="8d37fced5969657911facef553bf1f04"/><file name="InsertArticleParameter.php" hash="23707dad2636f8e0dda5423769f9e175"/><file name="InsertArticlesParameter.php" hash="4a6cdef758e32538ff4495d383567a4d"/><file name="UpdateArticleParameter.php" hash="d9291f525d389cc2c45be6ad2d5213ea"/><file name="UpdateArticlePicturesParameter.php" hash="33962ef42331f70924399e6ddfcad2fc"/></dir></dir><file name="Sell.php" hash="988998c316defb953db0c1a673ad7c52"/><dir name="SellerAccount"><dir name="Parameter"><file name="ArticlesParameter.php" hash="45b41edc80da0abca182528299e6013c"/><file name="ClosedArticlesParameter.php" hash="b45eb7085da6129b1b91218865016dcb"/><file name="OpenArticlesParameter.php" hash="601558abc262ec42d9d00f7ea7c0b044"/><file name="PlannedArticleParameter.php" hash="95c671b72c8b31a4dd396271bc5d13a2"/><file name="PlannedArticlesParameter.php" hash="f68737054ccda8cd5893f2448cbed2ee"/><file name="SoldArticlesParameter.php" hash="31aa25a901627cabf5b55c7f66a74f1b"/><file name="UnsoldArticlesParameter.php" hash="75e878f0d7fb1b9ed5a72278fb433d78"/></dir></dir><file name="SellerAccount.php" hash="0b85ab146483730609c1ab6ecd7ba974"/><file name="System.php" hash="c2b865dcfc0875cd417ec902dc759f69"/><file name=".DS_Store" hash="3f55d6d43043ccddf4ea7c5fc66d8c7d"/></dir><file name="Service.php" hash="697c4d014f6d70f223c21b7e90bbb82f"/><dir name="Services"><file name="Customer.php" hash="465b82a364b820d53312e57973abb6f4"/><file name="Search.php" hash="33f94a39029c57289a76bb85e2e05e13"/><file name="Security.php" hash="3e82163587f9f61ea52c24f706335251"/><file name="Sell.php" hash="e2b5c21046de7dc4c1822c94072f9449"/><file name="SellerAccount.php" hash="f01153d60678c43470a873fa83d6ae20"/><file name="ServiceAbstract.php" hash="41b0fcbaff2a2df4baa925c58028a39b"/><file name="System.php" hash="ed174d4b1b1113fe512a6e0d5c4c5164"/></dir><file name=".DS_Store" hash="a92165c9b8b0612e564d72ef98d27b53"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Diglin_Ricento.xml" hash="0400f55950fe9fd6c4782d6a25096efd"/></dir></target><target name="mageweb"><dir name="js"><dir name="ricento"><file name="Countable.js" hash="dc66f2e57b917e39f897f254bcc8ec1b"/><file name="adminhtml.js" hash="ceb469bc46126e7e31e97d289300870b"/><dir name="livepipe-ui"><file name="livepipe.js" hash="d15a0747cdc197a7f7081d5be4f20d01"/><file name="progressbar.js" hash="2153c666af9b91c65111124665cb57f7"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ricento.xml" hash="47215c6d724221414017e391ec0f692b"/></dir><dir name="template"><dir name="ricento"><dir name="dashboard"><file name="account.phtml" hash="ad9d11463db769518a00fcf2d8f1bbb5"/><file name="banner.phtml" hash="9233cbde4520f4419ca87691906b48c5"/><file name="bestsellers.phtml" hash="c48282d7a83354f8054b20b751b9852e"/><file name="lifeturnover.phtml" hash="09c399dcd6aa68cb503c987a43aa3dce"/><file name="news.phtml" hash="799bab071c5a7b20b4c81f99824d3bc0"/><file name="toolbar.phtml" hash="49f2571e6545ca3cebfb027904381b56"/><dir name="turnover"><file name="graph.phtml" hash="96117aecbc0a074884357713482e5878"/></dir><file name="turnover.phtml" hash="0a85c63eef0863076504ee479c419e60"/></dir><file name="dashboard.phtml" hash="9f5db0d087823f15e6d428ae6dd773ec"/><file name="iframe.phtml" hash="e256fa4dec9eadf41f7c2b5f10ba48bd"/><dir name="js"><dir name="rules"><dir name="validate"><file name="paymentshipping.phtml" hash="8977da22325a8c1f469ce7eb4166f793"/></dir></dir><dir name="salesoptions"><dir name="validate"><file name="increment.phtml" hash="22d268c8498ad4ee3d6a18bdf42d2c26"/></dir></dir><dir name="sync"><file name="progress.phtml" hash="6e8c2dff5d024c7cb093b4df56f46ff3"/></dir></dir><file name="log.phtml" hash="1402eabd3eb946784c59c68a724738d9"/><dir name="notifications"><file name="configured.phtml" hash="f36530088576fdc4836a40012700f252"/><file name="expiration.phtml" hash="01d21a1804692ee9a83f9dd3f05d407b"/></dir><dir name="payment"><dir name="info"><file name="default.phtml" hash="73254e7af8ebd279f6f4156e88e8f465"/><dir name="pdf"><file name="default.phtml" hash="5ea160a594ac5569c0f32a46cd472e14"/></dir></dir></dir><dir name="products"><dir name="category"><file name="children.phtml" hash="bfe6d5d5ba7cb24f4a0f3344af224f0c"/><dir name="mapping"><file name="tree.phtml" hash="3dabf207a79d32b143e00b397c4a041b"/></dir><file name="mapping.phtml" hash="25edee745a8baddd81556292976ec368"/></dir><dir name="listing"><file name="confirmation.phtml" hash="4a33fc972a5ccb1088b3f631d88b053c"/><dir name="item"><dir name="edit"><file name="form.phtml" hash="15557d807e5aa6b5b34285729e04c3af"/></dir><file name="preview.phtml" hash="2d40dcc958496d49f8f2a72d96e37d91"/></dir></dir></dir><file name="stats.phtml" hash="a2d523de72ac055fe9b85f923d2e7910"/><file name="support.phtml" hash="421232ce2c120b8e0aa1f4828a228fc8"/><dir name="sync"><dir name="check"><file name="popup.phtml" hash="4acc891d7ae7cb4cb07bc51ced5b438b"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="ricento"><dir name="payment"><dir name="info"><file name="default.phtml" hash="73254e7af8ebd279f6f4156e88e8f465"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="ricento"><dir name="css"><dir name="images"><file name="ajax-loader.gif" hash="73e57937304d89f251e7e540a24b095a"/><file name="arrow_sans_right_32.gif" hash="276b86bab75976c98e3c5202916d927a"/><file name="monotone_check_yes_ok.png" hash="b7b1d4c572e0c2ed10435a802549ae64"/><file name="ricardo_16x16.png" hash="5987591334d1b58f66ae4db2683fa8fd"/><file name="ricardo_32x32.png" hash="0635c69692c26a4bd4707a91336d9b3b"/><file name="settings_icon.png" hash="4bdae9a6199655027b8b8aeee8f80ce4"/><file name="warning_msg_icon.gif" hash="4cf6ec7f59ab09f9c18b3a4301714c6d"/><file name="window_maximize.png" hash="0f9c031e141822fed135270e34b128d5"/><file name="window_minimize.png" hash="62e6795471543a0eff14a07bf271d8d7"/></dir><file name="ricento.css" hash="8e7a0eddc9ee5855043f2da3915fcbc5"/></dir><dir name="images"><file name="KB.png" hash="187e953f8ebf9fe5829ec31427ff853b"/><file name="banner.png" hash="0b34711f9cdd44f07baef2b9b9536391"/><file name="contact.png" hash="85ed8d8113a897128ab1263e23b69dbb"/><file name="diglin.png" hash="cb24b7fec64fd8f906375d497b7e5e0f"/><file name="diglin@2x.png" hash="0e834d7839f61e789db16c028100b6ff"/><file name="github.png" hash="548d544d642e6afbba46dd2482f95af3"/><file name="online-support-48.png" hash="70f55fb3bc678875eaf53dfb214d7d3d"/><file name="ricardo.png" hash="21beeb511cf31d16ebc6b9d947806447"/><file name="ricardo@2x.png" hash="af83978f369def1e4e87fc06e4903c61"/><file name="settings-13-48.png" hash="3dc22c1da4f952687699e5fc23028232"/><file name="sinchronize-48.png" hash="15735cf3ca563303d9e981faba075750"/><file name="statistics-48.png" hash="38046c16959de9ee22b1679d4ddf3909"/><file name="view-details-48.png" hash="a8bbab2e728f1723e9e17dce5f939b22"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Diglin_Ricento.csv" hash="4721d10052e718654ed1926b5c28ff63"/><dir name="template"><dir name="email"><dir name="ricento"><file name="admin_message.html" hash="40225dc7f1b06dae985c230bc4f3d0b7"/><file name="private_message.html" hash="3b2ea2a457b176194d91aeb54a05bb47"/><file name="token_expiration.html" hash="d0214f1f7905f50328a1e13b0dd7a72d"/></dir></dir></dir></dir><dir name="fr_FR"><file name="Diglin_Ricento.csv" hash="6a6582e2a367b0b775589836b8e08c3a"/><dir name="template"><dir name="email"><dir name="ricento"><file name="admin_message.html" hash="40225dc7f1b06dae985c230bc4f3d0b7"/><file name="private_message.html" hash="3b2ea2a457b176194d91aeb54a05bb47"/><file name="token_expiration.html" hash="995fb9dea103f6efffc9c392efa160b7"/></dir></dir></dir></dir><dir name="de_DE"><file name="Diglin_Ricento.csv" hash="9993d5900582640a60f497f07f1d4521"/><dir name="template"><dir name="email"><dir name="ricento"><file name="admin_message.html" hash="40225dc7f1b06dae985c230bc4f3d0b7"/><file name="private_message.html" hash="3b2ea2a457b176194d91aeb54a05bb47"/><file name="support.html" hash="6e381c94546829bfb963276e51cf731b"/><file name="token_expiration.html" hash="d0214f1f7905f50328a1e13b0dd7a72d"/></dir></dir></dir></dir><dir name="de_CH"><file name="Diglin_Ricento.csv" hash="9993d5900582640a60f497f07f1d4521"/><dir name="template"><dir name="email"><dir name="ricento"><file name="admin_message.html" hash="40225dc7f1b06dae985c230bc4f3d0b7"/><file name="private_message.html" hash="3b2ea2a457b176194d91aeb54a05bb47"/></dir></dir></dir></dir></target></contents>
232
  <compatible/>
233
  <dependencies><required><php><min>5.3.2</min><max>5.6.0</max></php></required></dependencies>
234
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>diglin_ricento</name>
4
+ <version>1.3.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0">OSL v3.0</license>
7
  <channel>community</channel>
38
  &lt;p&gt;With around 700,000 current offers (auctions and fixed price), 2.5 million brand-name articles on &lt;a href="http://www.ricardoshops"&gt;ricardoshops&lt;/a&gt;.ch, around 100,000 vehicles plus 35,000 parts and accessories on &lt;a href="http://www.autoricardo.ch"&gt;autoricardo.ch&lt;/a&gt; and over 2.3 million members, ricardo.ch is the largest online marketplace in Switzerland. Every three minutes somebody buys an article on &lt;a href="http://www.ricardo.ch"&gt;ricardo.ch&lt;/a&gt; using a mobile device. ricardo.ch AG employs over 140 people in Switzerland and is headquartered in Zug.&lt;/p&gt;&#xD;
39
  &lt;h2&gt;About Diglin&lt;/h2&gt;&#xD;
40
  &lt;p&gt;&lt;a href="http://www.diglin.com"&gt;Diglin&lt;/a&gt; is the Swiss eCommerce Agency per excellence, realizing your eCommerce project with success. It will accompany along the whole life of your eCommerce project at any levels: conception, realization, design, marketing, logistic, data treatment and management, resource optimization, cost efficiency, increase in turnover, etc. Diglin concentrates its activities mainly with the solutions Magento (eCommerce), OroCRM (CRM) and Akeneo (PIM) and work with its partners highly qualified to provide you the best solutions regarding your needs. &lt;/p&gt;</description>
41
+ <notes>## Version 1.3.0&#xD;
42
+ - ENHANCEMENT: update API calls due to replacement of API methods with new methods name. Important: extension users MUST update to this version otherwise the extension won't work on 27.08.2015 cause of the ricardo API update.&#xD;
43
+ - ENHANCEMENT: send pictures in base64 encoding instead using bytes array. Decrease memory used on server side&#xD;
44
+ - ENHANCEMENT: update Support controllers due to Magento security patches&#xD;
45
+ - ENHANCEMENT: change the payment information box with article ID instead of the transaction ID (users are not aware about this transaction ID)&#xD;
46
+ - ENHANCEMENT: allow to create orders with products not in stock on Magento side.&#xD;
47
+ - FIX: issue with stopped products when there were in reactivation phase on ricardo.ch side&#xD;
48
+ - FIX: issue with products which should start immediately&#xD;
49
+ - FIX: several issues depending on some shops having third party extensions which may in conflict with the logic of this extension&#xD;
50
+ - FIX: issue with links to products from the log grid&#xD;
51
+ - FIX: issue with merging of orders under certain conditions depending on when the customers ordered several products of the shop owner&#xD;
52
+ - FIX: issue while resizing tall pictures hanging listing synchronization cause of pictures to big&#xD;
53
+ &#xD;
54
+ ## Version 1.2.0&#xD;
55
  - FEATURE: add column into customer (ricardo username) and order grid (is ricardo order?). Configurable to show them or not from configuration page of the extension&#xD;
56
  - FIX: amount of products to get fees is limited to 200 on ricardo.ch side. Get fees even if a shop owner has more than 200 article in the product list&#xD;
57
  &#xD;
239
  - be2b77a Update readme file&#xD;
240
  - 9384e3c Update doc</notes>
241
  <authors><author><name>diglin</name><user>diglin</user><email>sly@diglin.com</email></author></authors>
242
+ <date>2015-08-04</date>
243
+ <time>10:08:18</time>
244
+ <contents><target name="magecommunity"><dir name="Diglin"><dir name="Ricento"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Source"><file name="Heading.php" hash="b433ef94dec29580215fc43109ee8f8c"/><file name="Hint.php" hash="b7a7ba331d22590f59bfe8281241a4f0"/></dir></dir><dir name="Dashboard"><file name="Account.php" hash="8724a08f3683b47aaa2f72496cc70b6e"/><file name="Banner.php" hash="342cbe73ba3b32f9bdc8313149ec931a"/><file name="Bestsellers.php" hash="a9432528b536631a678319e82afeeeec"/><file name="Lifetime.php" hash="e3a70e02e94f980f9d1aaf0ecf9a20bb"/><file name="News.php" hash="6ee052d661649e532b9d1ca4678a572a"/><dir name="Renderer"><file name="Price.php" hash="0fc32c2882a63176370bef21733e9e21"/></dir><file name="Turnover.php" hash="5e6865955e7a9698593a53fec3726676"/></dir><dir name="Form"><dir name="Element"><dir name="Checkboxes"><file name="Extensible.php" hash="bc4c39a051f7a159f5e23dff34ad811d"/></dir><dir name="Fieldset"><file name="Inline.php" hash="292183da97b985cecc1b6d1ce1ee4a35"/></dir><dir name="Radios"><file name="Extensible.php" hash="0bd7bcc853668d572fa21be57bb47575"/></dir></dir></dir><dir name="Log"><dir name="Listing"><file name="Grid.php" hash="a63596ea658bbb9b1a156bbd5ffb76ee"/></dir><dir name="Sync"><dir name="Grid"><dir name="Renderer"><file name="Progress.php" hash="2c641830c3db9983ea8e43251f72e907"/><file name="Title.php" hash="329af6b8bede66748d82b85524ceae52"/></dir></dir><file name="Grid.php" hash="ed1b6b85b7d94acf4327e2975a953742"/></dir><file name="Tabs.php" hash="e08d00e946c5007c767757d060f2cc6d"/></dir><file name="Log.php" hash="f08554f883e53cc040248edd7118bd4f"/><dir name="Notifications"><file name="Default.php" hash="167bfaa55e28c709dbf3697d7830a71a"/><file name="Expiration.php" hash="df67759b72214cd362b0db736b585859"/></dir><dir name="Page"><file name="Menu.php" hash="0a6dde8103fb1444621ccdf484957c02"/></dir><dir name="Products"><dir name="Category"><file name="Children.php" hash="307e037abc251848b0694b3529edfbfc"/><dir name="Form"><dir name="Renderer"><file name="Categories.php" hash="76c3af26e9c3aa7c3d9f09d941997d57"/><file name="Mapping.php" hash="577e4fc684f8939deba30eb67dbd174c"/></dir></dir><dir name="Mapping"><file name="Tree.php" hash="524d1d3387fbaa130552aca4e0591598"/></dir><file name="Mapping.php" hash="cc5b960ad5aa5a25380435eccb157856"/><dir name="Tree"><file name="Categories.php" hash="515975899617d335d6976e27ef7b573d"/><file name="Form.php" hash="d81bbe3285b496dc3c14625aa9b91e03"/></dir><file name="Tree.php" hash="8aa9c622715b021a8e857410b881b68c"/></dir><dir name="Listing"><file name="Confirmation.php" hash="cdb2ceca5b00a34d5a947c91ca722cd6"/><dir name="Edit"><file name="Form.php" hash="e1a9fe7cab032a32ca3407a76ce7fbee"/><dir name="Renderer"><file name="Article.php" hash="cf0e96bc078ab23d5641f6f2022749c8"/><file name="Configured.php" hash="4660b7102533fa42a83eb37603cc76a7"/><file name="Customoptions.php" hash="64d5d9a0b2fb3a97145cee69eda09e0c"/><file name="Inventory.php" hash="772903adb11487f69a3d02846d3fefe6"/><file name="Name.php" hash="bb38f3924522574e64ba6e811ff46450"/><file name="Price.php" hash="b6112891273ff496374b2778227b4143"/><file name="Status.php" hash="b114cd85e41eca64fe57a6ff51d5ee43"/></dir><dir name="Tabs"><file name="General.php" hash="14d287a2fc7ff8913697be143f79a367"/><dir name="Products"><file name="Add.php" hash="13e1ebc227ba3518b9ec3bb600acd83c"/><file name="Massaction.php" hash="e9abc1d73fee5e1bb85569a80f37b9e5"/></dir><file name="Products.php" hash="33ffa7e18f36d06801bda306a477f563"/><file name="Rules.php" hash="7b913d102970f46fb8db6ec409322d7c"/><file name="Selloptions.php" hash="111b94ee6039995882b30f29ccbce570"/></dir><file name="Tabs.php" hash="6c3df947696a88a2509cfcf25a28c38b"/></dir><file name="Edit.php" hash="3218bc52a42c197113e595e09bf15623"/><dir name="Form"><file name="Abstract.php" hash="aa96a74bc83b7dae21a982812eb6fd90"/></dir><dir name="Grid"><dir name="Renderer"><file name="Status.php" hash="842be30b0586aa7481c91bd68928b955"/><file name="Total.php" hash="9570d3f5b50c043c0444d5fb3411f6f2"/></dir></dir><file name="Grid.php" hash="1d5c9ccc35e37b036754f41e950deda1"/><dir name="Item"><dir name="Edit"><file name="Form.php" hash="780650cb73819b55b355fe01119f703c"/><dir name="Tabs"><file name="Rules.php" hash="f8488f76c14247e25a61da9b03df0593"/><file name="Selloptions.php" hash="d4613fae72dd1fe3c68bff8419a82750"/></dir><file name="Tabs.php" hash="5d0781303281ae745d3609f907bd19d2"/></dir><file name="Edit.php" hash="b6ee4c68d4cd7732cfe0cdb3c488409f"/><file name="Preview.php" hash="3389aca73aff4caff4ac9ea1084553b0"/></dir><file name="Log.php" hash="039a8bce6ee15ad9c49eb0d427c55c83"/><dir name="New"><file name="Form.php" hash="38ab04ded807490619a0e3b1cb75c9e0"/></dir><file name="New.php" hash="59eea06c9b8ec22162c3fcaeba2933e1"/></dir><file name="Listing.php" hash="8d604c1f0dab741cef0a06cb9065cdbc"/></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Button.php" hash="67d754bed74b6389355d554b255e7488"/></dir></dir></dir></dir></dir><dir name="Payment"><file name="Info.php" hash="c63a717a400752ec569657d2cd418195"/></dir><file name=".DS_Store" hash="31ee3f6f18c48a810cc52381ac896e33"/></dir><dir name="Controller"><dir name="Adminhtml"><file name="Action.php" hash="cc992630b53816a388b8294775d27265"/><dir name="Products"><file name="Listing.php" hash="cf5edd43dc606d6a4621c8a1fd92f195"/></dir></dir><file name=".DS_Store" hash="327561801a5633650df45763bcd47ad3"/></dir><file name="Exception.php" hash="93c9bde391933089d1e6632cea5ad786"/><dir name="Helper"><file name="Api.php" hash="67ae3a1cc9a3a6ba9db34ed327865ae6"/><dir name="Dashboard"><file name="Turnover.php" hash="eda721699f2e5cf8e298e0024a63a545"/></dir><file name="Data.php" hash="033a9037765dcf2a769d60893e1406c2"/><file name="Image.php" hash="5a5471b5818cda558a0557557b43f5d7"/><file name="Price.php" hash="ef6cb7106ba52582621e2a59de2553e4"/><file name="Support.php" hash="3cca6b96cc057332d86dca6c41822eba"/><file name="Tools.php" hash="13c923ae2c56e8305e481cb27570212d"/><file name=".DS_Store" hash="42504db0bd8d0f8007bef503bf8111c1"/></dir><dir name="Model"><dir name="Api"><dir name="Services"><file name="Abstract.php" hash="d0c76c198a2c69c199e726da03abc7a6"/><file name="Customer.php" hash="d500e9e9035ffd8500407611f6796ad9"/><file name="Search.php" hash="d40fd404bfb3a2d5de9d6020df14b483"/><file name="Security.php" hash="d5f1d425155e4749344850e7b09feb22"/><file name="Sell.php" hash="19855539f2b83eebfb773c251f3f5958"/><file name="Selleraccount.php" hash="c0d31d32fee8b7c6347b81202a1ba0e5"/><file name="System.php" hash="7c20e49754e5e93503fc3ef7e4918dc8"/></dir><file name="Token.php" hash="a4145e890cafbd223fa42ba5b477c025"/></dir><dir name="Config"><dir name="Source"><file name="Abstract.php" hash="d671ca4f2f26f145f5fad2e30b532124"/><file name="Categories.php" hash="f982ceecede3d42547a08e6a36f49218"/><file name="Languages.php" hash="2c03657ebf714148b73cb3f15ef4488c"/><dir name="Products"><dir name="Listing"><file name="Log.php" hash="ba3a7d1e422755cd6739bed8820066c0"/><file name="Status.php" hash="170990ec2272e76863bbdc88be6a023b"/></dir></dir><dir name="Rules"><file name="Payment.php" hash="4d14509c99fa3c4fc26037b246f78265"/><dir name="Shipping"><file name="Availability.php" hash="f97891bf6fdf0765d0289c43bb457a97"/><file name="Calculation.php" hash="912f16d303a9b401d1de9d37296dde0a"/><file name="Packages.php" hash="d4ce5652ae2a80eeb8839290dfb64ee6"/></dir><file name="Shipping.php" hash="e66853a3ea9b51a0900fdadba935ae42"/></dir><dir name="Sales"><file name="Currency.php" hash="b07535355281a36f3b7e358d23a77e15"/><file name="Days.php" hash="5643dd61f80ccc52cbe29e75f18df2d9"/><dir name="Order"><file name="Status.php" hash="a3718bb7ab59b4d60748dee241888651"/></dir><dir name="Price"><file name="Method.php" hash="020a8e8d0d9d35802ea88c0028af4673"/><file name="Source.php" hash="94c5e4b5eb86ced80e5412159e6cf0f4"/></dir><dir name="Product"><dir name="Condition"><file name="Source.php" hash="14849df28b52facc5d91f462e9a90781"/></dir><file name="Condition.php" hash="32faa3b36d1b7de9577798578152d044"/></dir><file name="Promotion.php" hash="dfd838cfe50880d8d2facbf3b062b398"/><file name="Reactivation.php" hash="33d9dd75eeb119eb3b05bbb4dda8e432"/><file name="Template.php" hash="ccffc7632cd03d87f0245cd801d0bae5"/><file name="Type.php" hash="6f545897bbe8b99d5b30e4102279b827"/><file name="Warranty.php" hash="8762d38677d82bc8048e3d5d88b36eae"/></dir><file name="Status.php" hash="813afb1e443192b1d6a7d9937e56cafd"/><file name="Store.php" hash="6930c1537e4ebf98885d5c333bec3ffa"/><dir name="Sync"><file name="Progress.php" hash="d0430a73504085929ba5f8a3e867da07"/><file name="Status.php" hash="f4b8e72c905175730b3d566dee80ade6"/><file name="Type.php" hash="f3e216055d4e7e30f0d5a17de914a233"/></dir><file name="Watermark.php" hash="75b4bb2d4e63e970483ce3043ca33a7b"/><file name="Website.php" hash="c0168510dc5252a0689416959882136b"/></dir></dir><file name="Cron.php" hash="4cd03859ff8ea13780aa5e848b09267f"/><dir name="Dispatcher"><file name="Abstract.php" hash="5ad9a78133d9d8f42f77b0e8c6b9430a"/><dir name="Check"><file name="List.php" hash="6b9eef4d652debf6be1b333b73b737a0"/></dir><file name="Closed.php" hash="5f69215dc2a882a4d7b5af0d3954dd66"/><file name="List.php" hash="b13bea7fa0aaa4bbe69eb6e09d7037a4"/><file name="Order.php" hash="957c6784e9a5714bc9557b946c3cf11f"/><file name="Stop.php" hash="f52e9d9ba708fbe8e1f7674f8b99d663"/><dir name="Sync"><file name="List.php" hash="eb4cc8966d896098fa452a917b0d41e6"/></dir><file name="Transaction.php" hash="bbb12466742adb61a248c92de44ae8ed"/></dir><file name="Dispatcher.php" hash="d00fda597c8a294d6d133aceb0f7c922"/><dir name="Entity"><dir name="Attribute"><dir name="Source"><file name="Conditions.php" hash="1223272c226b7bf7d1c6c61f27ef687e"/></dir></dir></dir><file name="Feed.php" hash="fecf4fead5bf6ab0742a8b8b2cb39dea"/><file name="Filter.php" hash="ec774cc9129c39ca4b1daf39eff0e59d"/><file name="Observer.php" hash="a0cb400a1cfd9647f772bff37010b935"/><dir name="Products"><dir name="Category"><file name="Mapping.php" hash="b6df1431d7310759e5be17f29eb10df0"/></dir><file name="Category.php" hash="642f0520f549d520e9050a0286a56358"/><dir name="Listing"><dir name="Item"><file name="Product.php" hash="c64d6d91f1ef3f89b7fdbb3f19f50973"/></dir><file name="Item.php" hash="d4496d42ab84426652d8528de8e1a347"/><file name="Log.php" hash="98fa75315e6c2b490fea82854dbbbded"/></dir><file name="Listing.php" hash="8877ce70cb6ddb612e2f25ccfc3092c3"/></dir><dir name="Resource"><dir name="Api"><dir name="Token"><file name="Collection.php" hash="d2ab663440e27258841be3cf4a357a70"/></dir><file name="Token.php" hash="9899e9aa48e2ee7d416e840d575fff47"/></dir><dir name="Products"><dir name="Listing"><file name="Collection.php" hash="19b8f5d9d0107c897151d91e0cbae08e"/><dir name="Item"><file name="Collection.php" hash="c1d27c28e0c52f6f15641fe90cf2fba8"/></dir><file name="Item.php" hash="450a69ddd9023a40d1431f4a5c93a7db"/><dir name="Log"><file name="Collection.php" hash="c0b02c61246b76a31f2673931d90e985"/></dir><file name="Log.php" hash="514311bff0eee5b00e775c8b59b8b5a1"/></dir><file name="Listing.php" hash="450a3122ecd268a8714f90d06bd01328"/></dir><dir name="Rule"><file name="Collection.php" hash="9c35a937efb27fe3fd57616621035ceb"/></dir><file name="Rule.php" hash="2ec8533cbc357e2a204dcf6bcbdb2d88"/><dir name="Sales"><dir name="Options"><file name="Collection.php" hash="fbc1af66e9ce3c33f47cab4853d5bd3e"/></dir><file name="Options.php" hash="dbb7e3ecf2c1716cdbbc8fa81b25bdda"/><dir name="Transaction"><file name="Collection.php" hash="f661980fd6a907df331cd7df1f211dd0"/></dir><file name="Transaction.php" hash="f81eb7d223ab9357598199150c1281a2"/></dir><dir name="Sync"><file name="Abstract.php" hash="15030d2414b0ad5dc99b56cd656f92e8"/><dir name="Job"><file name="Collection.php" hash="b9bd2b8a3a7271524e65898a5f1fbd68"/><dir name="Listing"><file name="Collection.php" hash="a713a5910489912448c85a9987635a45"/></dir><file name="Listing.php" hash="44ec78a770948d9504c1138ce1f41fe1"/></dir><file name="Job.php" hash="a7496261d34501fc9a5c56a87110c688"/></dir></dir><file name="Rule.php" hash="4ff575a44898a6b63cdb22dc1c3bb180"/><dir name="Sales"><dir name="Method"><file name="Payment.php" hash="9ba10f1ceb6f4a97cb02a852afbb7e15"/><file name="Shipping.php" hash="2c7a63fe51d57deaf2cbc9c6ede6099b"/></dir><file name="Options.php" hash="d6bb5ab7343e79f2341113b8b6a123d0"/><dir name="Order"><file name="Create.php" hash="fa28733d72ddc214510f64f559189bf3"/><file name="Exception.php" hash="74d31df9035a6145563b25e9a5b0324b"/></dir><file name="Transaction.php" hash="81133f876c4988ebcf89f9bad6a19cd3"/></dir><file name="SplAutoloader.php" hash="39c58e1f9e4221d222960b801f9367e3"/><dir name="Sync"><file name="Abstract.php" hash="fc6ac3f307ea104c66fe4e758dd3a4a9"/><dir name="Job"><file name="Listing.php" hash="593875bf5d4d5588b684e39d833779b7"/></dir><file name="Job.php" hash="3983213a2e778479676fddcb74dc0e38"/></dir><dir name="Validate"><dir name="Products"><file name="Item.php" hash="4c1c96a5231c7465bb985612380e5386"/></dir><dir name="Rules"><file name="Methods.php" hash="9dcfc409d29f8eeb301c109212f1956e"/></dir><dir name="Sales"><file name="Increment.php" hash="1f92ec9c6ca26d34bdb3981e777bda14"/></dir></dir><file name=".DS_Store" hash="d5de4ee15d1a49eaf5f49c7eea228861"/></dir><dir name="Test"><dir name="Model"><file name="Feed.php" hash="21c43e7f00928e1679a51ba1a77f0802"/><dir name="Rule"><dir name="Validate"><dir name="expectations"><file name="testPaymentMethodCombinations.yaml" hash="c1070f1ae555a8c32a7761980e589857"/></dir><dir name="providers"><file name="testPaymentMethodCombinations.yaml" hash="0dfd5c1d335e10540607a391b33a9a2c"/></dir></dir><file name="Validate.php" hash="08260abb9a0bd685da4097916dfddc31"/></dir><dir name="Sales"><dir name="Validate"><dir name="Increment"><dir name="expectations"><file name="testStartPriceIncrementCombination.yaml" hash="15ffe7bd8373cda25aed179c08171881"/></dir><dir name="providers"><file name="testStartPriceIncrementCombination.yaml" hash="345726c8c358be678a93c38fbff504dc"/></dir></dir><file name="Increment.php" hash="e32cd91e3f683e5300cbb91ad6f2f093"/></dir></dir></dir><file name=".DS_Store" hash="2d0ef23cfffbd7152f42d8ffd810eb3d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AccountController.php" hash="384f2a7243924800fec9c10fcd9c912d"/><file name="ApiController.php" hash="9a1c834f6089fc6a027e470a915e5bbd"/><file name="DashboardController.php" hash="7f8935c4ca61e3b06181eec134d4649a"/><file name="IndexController.php" hash="d0332979d87a4d715934919671574853"/><file name="LogController.php" hash="2102931b5793049ca3878b5767898e6a"/><dir name="Products"><file name="CategoryController.php" hash="a40797fa2b687890099b4b52725e4337"/><dir name="Listing"><file name="ItemController.php" hash="9a2f5a037d9f5dfe3737a98217cd6728"/></dir><file name="ListingController.php" hash="0b2d712157c077e6f2a28f63c760cde0"/></dir><file name="SupportController.php" hash="b7d02dec97491b665bf0afef5310a21f"/><file name="SyncController.php" hash="77315fd98363dab57a60bdd7b2e85c87"/></dir><file name=".DS_Store" hash="8ed1eee308aa55c32c2780d7b0be6db3"/></dir><dir name="data"><dir name="ricento_setup"><file name="data-install-1.0.0.php" hash="738f1d059e3968daea8592615106c7cf"/><file name="data-upgrade-1.0.18-1.1.0.php" hash="7f4480a5e13d64529e87219bc7f3348e"/><file name="data-upgrade-1.1.3-1.1.4.php" hash="3abe85a002f54038dfd8fe14902f8fb1"/></dir><file name=".DS_Store" hash="7a5eb044b368a5c2b1ed98d94ce316cb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="48d0016b44d8f0851094ecfff462541e"/><file name="config.xml" hash="6deb97be939ea9a31a536220b34c8075"/><file name="jstranslator.xml" hash="3a4a6307012f9660f925863659b38a2f"/><file name="system.xml" hash="8eccb649f84ee7d0423714c6a6da45f7"/><file name="uninstall.txt" hash="660b44580246f818f8e22f4c5a530c9b"/></dir><dir name="sql"><dir name="ricento_setup"><file name="install-1.0.0.php" hash="bc9f3b05ae68e0d8899a066384566801"/><file name="uninstall.php" hash="d0e2d68583a950374796b1d817c2958f"/><file name="upgrade-1.0.18-1.1.0.php" hash="fcf5dae1df75bbd2bca9193eef430d75"/><file name="upgrade-1.0.8-1.0.9.php" hash="47e0ce995ae6d7aff77245cbf05d0832"/><file name="upgrade-1.1.2-1.1.3.php" hash="c0c6c88441cd7aa216b04b512f4a44bc"/><file name="upgrade-1.1.3-1.1.4.php" hash="bc6aedfbbaf0cb942820579eecc6b912"/></dir><file name=".DS_Store" hash="7e19d3c3504d466eef74382a945d7586"/></dir><file name=".DS_Store" hash="14c930c693090ea2450151cc3bb8b5f6"/></dir></dir></target><target name="magelib"><dir name="Diglin"><dir name="Ricardo"><file name="Api.php" hash="134fa85c9b0103979ad93ab67250c5f0"/><dir name="Composer"><file name="Magento.php" hash="2b1396d290496bd8e744d6d5b0be797e"/></dir><file name="Config.php" hash="1045568136c433270ddc178025d96a87"/><dir name="Core"><file name="ApiInterface.php" hash="c5a36ca69d27d76d913a2c4cb2d5876e"/><file name="ConfigInterface.php" hash="cd5d8d9eb5e0dd6946d4caf63f0cf6b2"/><file name="Helper.php" hash="4695227c2c6ddb099559fd688b54aa60"/></dir><dir name="Enums"><file name="AbstractEnums.php" hash="8e401abbc33bdbab34223bb3f4950166"/><dir name="Article"><file name="ArticlesTypes.php" hash="e13b730e4c5656091305c6e8a1031b8f"/><file name="CloseListStatus.php" hash="d67f65e3de13cf6747e6e10bc0c1bb21"/><file name="InternalReferenceType.php" hash="6c8eddab52eea86efb142999f76e7b65"/><file name="PromotionCode.php" hash="67c1026f8d2e31e02083c99bdc1250b3"/><file name="Warranty.php" hash="ec403c6fe606572fdb7e92eda4e2eff0"/></dir><file name="ArticleErrors.php" hash="705927167cdc08eb4ada7d7ce055af22"/><dir name="Customer"><file name="ArticleTypeFilter.php" hash="1ae6e485167cb19da3eadd12efe9cc42"/><file name="OpenArticlesSortBy.php" hash="7b73af00d1a0af79ffa33d0281d2af28"/><file name="PaidStatusFilter.php" hash="b6ff931bebcfa37a09a5cab04fdb7448"/><file name="ShippedStatusFilter.php" hash="c906c8a60ea6e91f68bf1015dce18177"/><file name="SoldArticlesSortBy.php" hash="80c3241b09c3f61a1711a449404667e0"/></dir><file name="CustomerErrors.php" hash="38588fb9c5a425d490593dc5f23eb2d7"/><file name="GeneralErrors.php" hash="65c4369f521e99dfe8f20f0b0b5d67a3"/><file name="PaymentMethods.php" hash="4bfcb7bc7ab1181cb8cc544f050b5d6b"/><file name="PictureErrors.php" hash="ad7e4888ec4b8b43ab70b2154de4adc0"/><file name="PictureExtension.php" hash="9f76c645e57efed13f52d74c23a687e6"/><file name="SearchErrors.php" hash="f16b01e7d62b76734a38776e546beb7f"/><file name="SecurityErrors.php" hash="cb6112e33a4d8fb318e84e028181838b"/><dir name="System"><file name="CategoryArticleType.php" hash="8b680d1791cafec2e43907b144ad63c8"/><file name="CategoryBrandingFilter.php" hash="c7eb8c9d61adb8cc76ae3c47638fcfab"/><file name="LanguageCode.php" hash="6998c880c44fbdbe3b60321818976b9a"/><file name="LanguageId.php" hash="bcef589026b025591b4fa6bb9328fbbd"/></dir></dir><dir name="Exceptions"><file name="ArticleException.php" hash="b5290b26c6e711e6f1074f9d6687c066"/><file name="CurlException.php" hash="b1fa36bf6f663f942ec444dcc1e75044"/><file name="CustomerException.php" hash="d011aad98f970733f7eefe369f53fee6"/><file name="ExceptionAbstract.php" hash="8c868ba9a1a200aae3b59240b01faa70"/><file name="GeneralException.php" hash="18d42b47fd69a9b427cb4427a5d56e56"/><file name="PictureException.php" hash="ba3f6cc087f6b0103ecc96b4357ab0ac"/><file name="SearchException.php" hash="ecd9902786eecb50414d3dd7e01b3492"/><file name="SecurityException.php" hash="b4b500a3f2abdc3bc957284d5fbc42a9"/><file name="TechnicalException.php" hash="fdad217159c2c995ef4415e6f6383456"/></dir><dir name="Managers"><file name="Customer.php" hash="e2b3241594fecb5ef944466b34c8fbfe"/><file name="ManagerAbstract.php" hash="13dca083592bd0651f06a03fe9dd589a"/><file name="ParameterAbstract.php" hash="e9725c5915f48d375bef33f377247083"/><dir name="Search"><dir name="Parameter"><file name="GetCategoryBestMatchParameter.php" hash="14619ec6f6dc3e45d68930189cd27ec9"/></dir></dir><file name="Search.php" hash="66d5733d48ebb8711525650cce74e705"/><file name="Security.php" hash="b9dd72f0724ec454d023b4767b687116"/><dir name="Sell"><dir name="Parameter"><file name="AddArticlePicturesParameter.php" hash="8e607c9579f951f94a9bed199acc1145"/><file name="AppendArticleDescriptionParameter.php" hash="f38f51ff97640e024a4c08cc6eeab652"/><file name="AppendDescriptionParameter.php" hash="8140c7d52d1f33dbe621e889251b923f"/><file name="ArticleDeliveryParameter.php" hash="d695329a3bc7e47b4409e11a3042e1a2"/><file name="ArticleDescriptionParameter.php" hash="98fef4f221b9f3a11ee9078bfd5116f0"/><file name="ArticleInformationParameter.php" hash="9900793d70875a80ca47d5d3e98691a9"/><file name="ArticleInternalReferenceParameter.php" hash="84cf8bcf50e6dda593b4f9570e1f6ed9"/><file name="ArticlePictureParameter.php" hash="795c16aa7096c1086cffe6506b051e8e"/><file name="BaseInsertArticleWithTrackingParameter.php" hash="5fdeb6656f1b0ebdf9fb76c8ba5973df"/><file name="CloseArticleParameter.php" hash="7f0a426ba4b277d9c02be87b5725cc45"/><file name="CloseArticlesParameter.php" hash="cbdc9f2045c7e1b440b5252d63717947"/><file name="ClosePlannedArticleParameter.php" hash="5ee0ee9a0b79098ee38bf0a4f8420551"/><file name="DeletePlannedArticleParameter.php" hash="f86cb01ff7cb1b91ece3191cde3cf6e1"/><file name="DeletePlannedArticlesParameter.php" hash="af2ec04803bb457b070fd73db749a72d"/><file name="GetArticleFeeParameter.php" hash="926f8960ce9162686d1eee03002ef5ca"/><file name="GetArticlesFeeParameter.php" hash="8d37fced5969657911facef553bf1f04"/><file name="InsertArticleParameter.php" hash="23707dad2636f8e0dda5423769f9e175"/><file name="InsertArticlesParameter.php" hash="4a6cdef758e32538ff4495d383567a4d"/><file name="UpdateArticleParameter.php" hash="d9291f525d389cc2c45be6ad2d5213ea"/><file name="UpdateArticlePicturesParameter.php" hash="33962ef42331f70924399e6ddfcad2fc"/></dir></dir><file name="Sell.php" hash="99ef921edc554dcfc7b2d81fed38f3a1"/><dir name="SellerAccount"><dir name="Parameter"><file name="ArticlesParameter.php" hash="45b41edc80da0abca182528299e6013c"/><file name="ClosedArticlesParameter.php" hash="b45eb7085da6129b1b91218865016dcb"/><file name="OpenArticlesParameter.php" hash="601558abc262ec42d9d00f7ea7c0b044"/><file name="PlannedArticleParameter.php" hash="95c671b72c8b31a4dd396271bc5d13a2"/><file name="PlannedArticlesParameter.php" hash="f68737054ccda8cd5893f2448cbed2ee"/><file name="SoldArticlesParameter.php" hash="31aa25a901627cabf5b55c7f66a74f1b"/><file name="UnsoldArticlesParameter.php" hash="75e878f0d7fb1b9ed5a72278fb433d78"/></dir></dir><file name="SellerAccount.php" hash="0b85ab146483730609c1ab6ecd7ba974"/><file name="System.php" hash="c2b865dcfc0875cd417ec902dc759f69"/></dir><file name="Service.php" hash="697c4d014f6d70f223c21b7e90bbb82f"/><dir name="Services"><file name="Customer.php" hash="465b82a364b820d53312e57973abb6f4"/><file name="Search.php" hash="6be0957fb2b889736d9a360e00b5142b"/><file name="Security.php" hash="3e82163587f9f61ea52c24f706335251"/><file name="Sell.php" hash="28e657558ae2e7af2bedf247cdc81f1a"/><file name="SellerAccount.php" hash="f01153d60678c43470a873fa83d6ae20"/><file name="ServiceAbstract.php" hash="41b0fcbaff2a2df4baa925c58028a39b"/><file name="System.php" hash="ed174d4b1b1113fe512a6e0d5c4c5164"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Diglin_Ricento.xml" hash="0400f55950fe9fd6c4782d6a25096efd"/></dir></target><target name="mageweb"><dir name="js"><dir name="ricento"><file name="Countable.js" hash="dc66f2e57b917e39f897f254bcc8ec1b"/><file name="adminhtml.js" hash="ceb469bc46126e7e31e97d289300870b"/><dir name="livepipe-ui"><file name="livepipe.js" hash="d15a0747cdc197a7f7081d5be4f20d01"/><file name="progressbar.js" hash="2153c666af9b91c65111124665cb57f7"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ricento.xml" hash="47215c6d724221414017e391ec0f692b"/></dir><dir name="template"><dir name="ricento"><dir name="dashboard"><file name="account.phtml" hash="ad9d11463db769518a00fcf2d8f1bbb5"/><file name="banner.phtml" hash="9233cbde4520f4419ca87691906b48c5"/><file name="bestsellers.phtml" hash="c48282d7a83354f8054b20b751b9852e"/><file name="lifeturnover.phtml" hash="09c399dcd6aa68cb503c987a43aa3dce"/><file name="news.phtml" hash="799bab071c5a7b20b4c81f99824d3bc0"/><file name="toolbar.phtml" hash="49f2571e6545ca3cebfb027904381b56"/><dir name="turnover"><file name="graph.phtml" hash="96117aecbc0a074884357713482e5878"/></dir><file name="turnover.phtml" hash="0a85c63eef0863076504ee479c419e60"/></dir><file name="dashboard.phtml" hash="9f5db0d087823f15e6d428ae6dd773ec"/><file name="iframe.phtml" hash="e256fa4dec9eadf41f7c2b5f10ba48bd"/><dir name="js"><dir name="rules"><dir name="validate"><file name="paymentshipping.phtml" hash="8977da22325a8c1f469ce7eb4166f793"/></dir></dir><dir name="salesoptions"><dir name="validate"><file name="increment.phtml" hash="22d268c8498ad4ee3d6a18bdf42d2c26"/></dir></dir><dir name="sync"><file name="progress.phtml" hash="6e8c2dff5d024c7cb093b4df56f46ff3"/></dir></dir><file name="log.phtml" hash="1402eabd3eb946784c59c68a724738d9"/><dir name="notifications"><file name="configured.phtml" hash="f36530088576fdc4836a40012700f252"/><file name="expiration.phtml" hash="01d21a1804692ee9a83f9dd3f05d407b"/></dir><dir name="payment"><dir name="info"><file name="default.phtml" hash="771301b833f6e04b52cf9e9ef09fa188"/><dir name="pdf"><file name="default.phtml" hash="5ea160a594ac5569c0f32a46cd472e14"/></dir></dir></dir><dir name="products"><dir name="category"><file name="children.phtml" hash="bfe6d5d5ba7cb24f4a0f3344af224f0c"/><dir name="mapping"><file name="tree.phtml" hash="3dabf207a79d32b143e00b397c4a041b"/></dir><file name="mapping.phtml" hash="25edee745a8baddd81556292976ec368"/></dir><dir name="listing"><file name="confirmation.phtml" hash="4a33fc972a5ccb1088b3f631d88b053c"/><dir name="item"><dir name="edit"><file name="form.phtml" hash="15557d807e5aa6b5b34285729e04c3af"/></dir><file name="preview.phtml" hash="2d40dcc958496d49f8f2a72d96e37d91"/></dir></dir></dir><file name="stats.phtml" hash="a2d523de72ac055fe9b85f923d2e7910"/><file name="support.phtml" hash="421232ce2c120b8e0aa1f4828a228fc8"/><dir name="sync"><dir name="check"><file name="popup.phtml" hash="4acc891d7ae7cb4cb07bc51ced5b438b"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="ricento"><dir name="payment"><dir name="info"><file name="default.phtml" hash="73254e7af8ebd279f6f4156e88e8f465"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="ricento"><dir name="css"><dir name="images"><file name="ajax-loader.gif" hash="73e57937304d89f251e7e540a24b095a"/><file name="arrow_sans_right_32.gif" hash="276b86bab75976c98e3c5202916d927a"/><file name="monotone_check_yes_ok.png" hash="b7b1d4c572e0c2ed10435a802549ae64"/><file name="ricardo_16x16.png" hash="5987591334d1b58f66ae4db2683fa8fd"/><file name="ricardo_32x32.png" hash="0635c69692c26a4bd4707a91336d9b3b"/><file name="settings_icon.png" hash="4bdae9a6199655027b8b8aeee8f80ce4"/><file name="warning_msg_icon.gif" hash="4cf6ec7f59ab09f9c18b3a4301714c6d"/><file name="window_maximize.png" hash="0f9c031e141822fed135270e34b128d5"/><file name="window_minimize.png" hash="62e6795471543a0eff14a07bf271d8d7"/></dir><file name="ricento.css" hash="8e7a0eddc9ee5855043f2da3915fcbc5"/></dir><dir name="images"><file name="KB.png" hash="187e953f8ebf9fe5829ec31427ff853b"/><file name="banner.png" hash="0b34711f9cdd44f07baef2b9b9536391"/><file name="contact.png" hash="85ed8d8113a897128ab1263e23b69dbb"/><file name="diglin.png" hash="cb24b7fec64fd8f906375d497b7e5e0f"/><file name="diglin@2x.png" hash="0e834d7839f61e789db16c028100b6ff"/><file name="github.png" hash="548d544d642e6afbba46dd2482f95af3"/><file name="online-support-48.png" hash="70f55fb3bc678875eaf53dfb214d7d3d"/><file name="ricardo.png" hash="21beeb511cf31d16ebc6b9d947806447"/><file name="ricardo@2x.png" hash="af83978f369def1e4e87fc06e4903c61"/><file name="settings-13-48.png" hash="3dc22c1da4f952687699e5fc23028232"/><file name="sinchronize-48.png" hash="15735cf3ca563303d9e981faba075750"/><file name="statistics-48.png" hash="38046c16959de9ee22b1679d4ddf3909"/><file name="view-details-48.png" hash="a8bbab2e728f1723e9e17dce5f939b22"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Diglin_Ricento.csv" hash="0a2a6458c816902af2baea8ec8bc9306"/><dir name="template"><dir name="email"><dir name="ricento"><file name="admin_message.html" hash="40225dc7f1b06dae985c230bc4f3d0b7"/><file name="private_message.html" hash="3b2ea2a457b176194d91aeb54a05bb47"/><file name="token_expiration.html" hash="d0214f1f7905f50328a1e13b0dd7a72d"/></dir></dir></dir></dir><dir name="fr_FR"><file name="Diglin_Ricento.csv" hash="a00c767781b5a221178ef756c4243d5a"/><dir name="template"><dir name="email"><dir name="ricento"><file name="admin_message.html" hash="40225dc7f1b06dae985c230bc4f3d0b7"/><file name="private_message.html" hash="3b2ea2a457b176194d91aeb54a05bb47"/><file name="token_expiration.html" hash="995fb9dea103f6efffc9c392efa160b7"/></dir></dir></dir></dir><dir name="de_DE"><file name="Diglin_Ricento.csv" hash="902644abcc8cc75246c46bad3a45bfd5"/><dir name="template"><dir name="email"><dir name="ricento"><file name="admin_message.html" hash="40225dc7f1b06dae985c230bc4f3d0b7"/><file name="private_message.html" hash="3b2ea2a457b176194d91aeb54a05bb47"/><file name="support.html" hash="6e381c94546829bfb963276e51cf731b"/><file name="token_expiration.html" hash="d0214f1f7905f50328a1e13b0dd7a72d"/></dir></dir></dir></dir><dir name="de_CH"><file name="Diglin_Ricento.csv" hash="902644abcc8cc75246c46bad3a45bfd5"/><dir name="template"><dir name="email"><dir name="ricento"><file name="admin_message.html" hash="40225dc7f1b06dae985c230bc4f3d0b7"/><file name="private_message.html" hash="3b2ea2a457b176194d91aeb54a05bb47"/></dir></dir></dir></dir></target></contents>
245
  <compatible/>
246
  <dependencies><required><php><min>5.3.2</min><max>5.6.0</max></php></required></dependencies>
247
  </package>