Version Notes
Initial release
Download this release
Release Info
Developer | EasyAds |
Extension | Marktfeed |
Version | 0.0.5 |
Comparing to | |
See all releases |
Code changes from version 0.0.1 to 0.0.5
- Api.php +91 -0
- app/code/community/Marktfeed/Api/Model/Api.php +8 -3
- package.xml +93 -25
Api.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Marktfeed_Api_Model_Api extends Mage_Api_Model_Resource_Abstract {
|
3 |
+
|
4 |
+
public function register($name, $guid) {
|
5 |
+
|
6 |
+
try {
|
7 |
+
|
8 |
+
$config = new Mage_Core_Model_Config();
|
9 |
+
$config ->saveConfig("marktfeed/api/register_name", $name, 'default', 0);
|
10 |
+
$config ->saveConfig("marktfeed/api/register_guid", $guid, 'default', 0);
|
11 |
+
}
|
12 |
+
catch (Exception $e) {
|
13 |
+
$this->_fault('general_error', $e->getMessage());
|
14 |
+
}
|
15 |
+
|
16 |
+
return true;
|
17 |
+
}
|
18 |
+
|
19 |
+
public function unregister() {
|
20 |
+
|
21 |
+
try {
|
22 |
+
|
23 |
+
//remove from config
|
24 |
+
$config = new Mage_Core_Model_Config();
|
25 |
+
$config ->saveConfig("marktfeed/api/register_name", '', 'default', 0);
|
26 |
+
$config ->saveConfig("marktfeed/api/register_guid", '', 'default', 0);
|
27 |
+
|
28 |
+
//remove api user
|
29 |
+
Mage::getModel('marktfeed_api/access')->removeUserAndRole();
|
30 |
+
}
|
31 |
+
catch (Exception $e) {
|
32 |
+
$this->_fault('general_error', $e->getMessage());
|
33 |
+
}
|
34 |
+
|
35 |
+
return true;
|
36 |
+
}
|
37 |
+
|
38 |
+
public function productlist($store_id, $limit, $page) {
|
39 |
+
|
40 |
+
//result object
|
41 |
+
$productResult = new StdClass();
|
42 |
+
$productResult->total = 0;
|
43 |
+
$productResult->products = array();
|
44 |
+
|
45 |
+
//set collection
|
46 |
+
$productCollection = Mage::getModel('catalog/product')
|
47 |
+
->getCollection()
|
48 |
+
->addAttributeToFilter('status', 1)
|
49 |
+
->setPageSize($limit)
|
50 |
+
->setCurPage($page);
|
51 |
+
|
52 |
+
//
|
53 |
+
if ($store_id != 0)
|
54 |
+
$productCollection->setStoreId($store_id);
|
55 |
+
|
56 |
+
$imageBaseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product';
|
57 |
+
|
58 |
+
//loop products
|
59 |
+
foreach ($productCollection AS $_product) {
|
60 |
+
|
61 |
+
$product = Mage::getModel('catalog/product')->load($_product->getId());
|
62 |
+
|
63 |
+
//get product data and remove un necessary data
|
64 |
+
$productData = $product->getData();
|
65 |
+
|
66 |
+
unset($productData["stock_item"]);
|
67 |
+
unset($productData["custom_layout_update"]);
|
68 |
+
unset($productData["request_path"]);
|
69 |
+
unset($productData["media_gallery"]);
|
70 |
+
|
71 |
+
//add product categories
|
72 |
+
$productData["category_ids"] = $product->getCategoryIds();
|
73 |
+
|
74 |
+
//add product images
|
75 |
+
$productData["images"] = array();
|
76 |
+
|
77 |
+
foreach ($product->getData('media_gallery')["images"] as $image) {
|
78 |
+
$productData["images"][] = $imageBaseUrl . $image["file"];
|
79 |
+
}
|
80 |
+
|
81 |
+
//add to result
|
82 |
+
$productResult->products[] = $productData;
|
83 |
+
}
|
84 |
+
|
85 |
+
//set total
|
86 |
+
$productResult->total = $productCollection->getSize();
|
87 |
+
|
88 |
+
//return products
|
89 |
+
return $productResult;
|
90 |
+
}
|
91 |
+
}
|
app/code/community/Marktfeed/Api/Model/Api.php
CHANGED
@@ -52,6 +52,8 @@ class Marktfeed_Api_Model_Api extends Mage_Api_Model_Resource_Abstract {
|
|
52 |
//
|
53 |
if ($store_id != 0)
|
54 |
$productCollection->setStoreId($store_id);
|
|
|
|
|
55 |
|
56 |
//loop products
|
57 |
foreach ($productCollection AS $_product) {
|
@@ -60,6 +62,7 @@ class Marktfeed_Api_Model_Api extends Mage_Api_Model_Resource_Abstract {
|
|
60 |
|
61 |
//get product data and remove un necessary data
|
62 |
$productData = $product->getData();
|
|
|
63 |
unset($productData["stock_item"]);
|
64 |
unset($productData["custom_layout_update"]);
|
65 |
unset($productData["request_path"]);
|
@@ -70,10 +73,12 @@ class Marktfeed_Api_Model_Api extends Mage_Api_Model_Resource_Abstract {
|
|
70 |
|
71 |
//add product images
|
72 |
$productData["images"] = array();
|
73 |
-
|
74 |
-
|
|
|
|
|
75 |
}
|
76 |
-
|
77 |
//add to result
|
78 |
$productResult->products[] = $productData;
|
79 |
}
|
52 |
//
|
53 |
if ($store_id != 0)
|
54 |
$productCollection->setStoreId($store_id);
|
55 |
+
|
56 |
+
$imageBaseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product';
|
57 |
|
58 |
//loop products
|
59 |
foreach ($productCollection AS $_product) {
|
62 |
|
63 |
//get product data and remove un necessary data
|
64 |
$productData = $product->getData();
|
65 |
+
|
66 |
unset($productData["stock_item"]);
|
67 |
unset($productData["custom_layout_update"]);
|
68 |
unset($productData["request_path"]);
|
73 |
|
74 |
//add product images
|
75 |
$productData["images"] = array();
|
76 |
+
|
77 |
+
$media_gallery = $product->getData('media_gallery');
|
78 |
+
foreach ($media_gallery["images"] as $image) {
|
79 |
+
$productData["images"][] = $imageBaseUrl . $image["file"];
|
80 |
}
|
81 |
+
|
82 |
//add to result
|
83 |
$productResult->products[] = $productData;
|
84 |
}
|
package.xml
CHANGED
@@ -1,37 +1,105 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
-
<name>
|
4 |
-
<version>0.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/mit-license.php">MIT License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Marktfeed is dé tool voor webshophouders die producten volledig automatisch op Marktplaats willen plaatsen.</summary>
|
10 |
-
<description><
|
11 |
-
<
|
12 |
-
|
13 |
-
<
|
14 |
-
<
|
15 |
-
<
|
16 |
-
|
17 |
-
</
|
18 |
-
<
|
19 |
-
<
|
20 |
-
|
21 |
-
</
|
22 |
-
<
|
23 |
-
<
|
24 |
-
|
25 |
-
</
|
26 |
-
<
|
27 |
-
<
|
28 |
-
|
29 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
<notes>Initial release</notes>
|
31 |
<authors><author><name>EasyAds</name><user>MAG002936376</user><email>development@easyads.eu</email></author></authors>
|
32 |
-
<date>
|
33 |
-
<time>
|
34 |
<contents><target name="magecommunity"><dir name="Marktfeed"><dir name="Api"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="dcb4ad0381bba57dea30856aeed6f1f7"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="State.php" hash="f32e32ac1887fe8f6a386e34cdbb92a7"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="f85529026c61208f0c8105c8bdb6c34d"/></dir><dir name="Model"><file name="Access.php" hash="f37466fbbdd5c0ee2acbd96944d20f9c"/><file name="Api.php" hash="5e6b7bcde06b869283cd0d3cc54c5af1"/></dir><dir name="controllers"><file name="ConfigController.php" hash="c1fb8e4e65836ce8083dec56fe4d1b32"/></dir><dir name="etc"><file name="api.xml" hash="da3e60fecea102158a2b51ef86fe8a73"/><file name="config.xml" hash="0c7f26c3fb4890c5c461e70c088c3594"/><file name="system.xml" hash="11d95131a1dad9aafa2999b7ba8b9139"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Marktfeed_Api.xml" hash="90686744467ac041b7e72163d7f05432"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="marktfeed"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="d57f28440074ae93c0be2b08662e1fab"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="nl_NL"><file name="Marktfeed_Api.csv" hash="08fb93e07fc895e2644df8cc85e517f5"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="marktfeed"><file name="connected.png" hash="b4ea92038d64fe62aaf9ccd78214d026"/><file name="disconnected.png" hash="b48ea8cabc59712048c74ed72728dedc"/><file name="logo-marktfeed.png" hash="f6ab9dd2ea5701e46daaa29ea42a5e9c"/></dir></dir></dir></dir></dir></target></contents>
|
35 |
<compatible/>
|
36 |
-
<dependencies><required><php><min>5.2.0</min><max>
|
37 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
+
<name>18c5a347-b2f6-4a24-9f66-6c46e6f5233e</name>
|
4 |
+
<version>0.0.5</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/mit-license.php">MIT License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Marktfeed is dé tool voor webshophouders die producten volledig automatisch op Marktplaats willen plaatsen.</summary>
|
10 |
+
<description><p>Marktfeed, an official API partner of Marktplaats.nl, is the ideal tool for automatic real-time ad placements on Marktplaats for all Magento shop owners. You can manage your products on the biggest e-commerce website of The Netherlands with this easy solution. <a href="https://youtu.be/52JhYMYrTOw">Watch our video</a>
|
11 |
+
</p>
|
12 |
+
<h2>Why Marktfeed?</h2>
|
13 |
+
<ul>
|
14 |
+
<li>
|
15 |
+
Dedicated tool for Marktplaats.nl</li>
|
16 |
+
<li>
|
17 |
+
Real-time product imports and &ndash;updates</li>
|
18 |
+
<li>
|
19 |
+
Costs and budget insight, cpc variations, real-time statistics</li>
|
20 |
+
<li>
|
21 |
+
Extensive category mapping with support for advanced rules</li>
|
22 |
+
<li>
|
23 |
+
Simple set-up and easy to use interface, for every shop owner</li>
|
24 |
+
<li>
|
25 |
+
Excellent Dutch, English and German customer support</li>
|
26 |
+
<li>
|
27 |
+
No setup-fees, No contracts</li>
|
28 |
+
<li>
|
29 |
+
14 days trial, Only &euro;29,- / month</li>
|
30 |
+
</ul>
|
31 |
+
<h2>Product flow:</h2>
|
32 |
+
<h3>Connect to Marktplaats Admarkt</h3>
|
33 |
+
<p>
|
34 |
+
Easily link your existing Marktplaats Admarkt account safely to Marktfeed. You will keep your own Marktplaats account(data) and invoicing between Marktplaats and your shop will remain like you&rsquo;re used to. If you don&rsquo;t have an Admarkt account yet, you will receive &euro; 50 free credits from Marktplaats. The voucher code will be send to you after you register with Marktfeed.
|
35 |
+
</p>
|
36 |
+
<h3>Automatically import your products from Magento</h3>
|
37 |
+
<p>
|
38 |
+
Simply connect your shop using the available plug-in with Marktfeed. Your products will automatically be imported from your Magento shop. Marktfeed has an easy to use interface which allows you to import your products without technical knowledge.
|
39 |
+
</p>
|
40 |
+
<h3>Map your categories</h3>
|
41 |
+
<p>
|
42 |
+
With our smart mapping tool you only have to map your categories once. The Marktfeed mapping tool will support you with the mapping and for advanced users it&rsquo;s possible to define advanced rules. Our extensive category structure ensures you&rsquo;ll create good quality ads by using the right properties associated with your products. This way your ads will get found easier and you&rsquo;ll get more traffic to your website.
|
43 |
+
</p>
|
44 |
+
<h3>
|
45 |
+
Publish your ads on Marktplaats</h3>
|
46 |
+
<p>
|
47 |
+
Within the Marktfeed interface your ads will automatically be generated using the product data from your Magento shop. You have complete control over your ad placements on Marktplaats from your Marktfeed-cockpit. Aside from organized management of your cost-per-click, budgets and ad statuses, Marktfeed has some more useful tools which will make you happy.
|
48 |
+
</p>
|
49 |
+
<h3>
|
50 |
+
Goal reached: real-time product synchronization and statistics</h3>
|
51 |
+
<p>
|
52 |
+
Marktfeed has a real-time connection to Marktplaats: this means that your ads are always up-to-date according to your product inventory in your Magento online shop. You have access to real-time statistics which will be mailed to you monthly. Use Marktfeed&rsquo;s UTM-tagging tool to measure your results and sales within Analytics. Now you&rsquo;re using Marktfeed as a handy tool to automate ad placements on Marktplaats and to optimize your sales!
|
53 |
+
</p>
|
54 |
+
<hr />
|
55 |
+
<h2>
|
56 |
+
Marktfeed.nl - Automatisch advertenties plaatsen op Marktplaats.nl</h2>
|
57 |
+
<p>
|
58 |
+
Marktfeed is partner van Marktplaats voor alle Magento-shop houders die producten volledig automatisch op Marktplaats willen plaatsen. De meest innovatieve en complete tool om je producten real-time om te zetten naar goed converterende Admarkt advertenties. <a href="https://youtu.be/52JhYMYrTOw">Bekijk onze video</a>
|
59 |
+
&nbsp;</p>
|
60 |
+
<h2>
|
61 |
+
Waarom Marktfeed?</h2>
|
62 |
+
<ul>
|
63 |
+
<li>
|
64 |
+
Specifieke tool voor Marktplaats Admarkt</li>
|
65 |
+
<li>
|
66 |
+
Real-time producten importeren en up-daten</li>
|
67 |
+
<li>
|
68 |
+
Kosten en (maand) budget controle, cpc variaties, real-time statistieken</li>
|
69 |
+
<li>
|
70 |
+
Uitgebreide rubriekenstructuur met mogelijkheid voor geavanceerde regels</li>
|
71 |
+
<li>
|
72 |
+
Eenvoudige set-up en gebruikersvriendelijke interface, voor elke shophouder te begrijpen</li>
|
73 |
+
<li>
|
74 |
+
Uitstekende Nederlandstalige klantenservice en &ndash;support</li>
|
75 |
+
<li>
|
76 |
+
Geen contracten en setupkosten, 14 dagen gratis uitproberen</li>
|
77 |
+
<li>Voordelige prijs van &euro;29,- per maand (5.000 producten)</li>
|
78 |
+
</ul>
|
79 |
+
<h2>Stappen voor succesvol plaatsen op Admarkt Marktplaats</h2>
|
80 |
+
<h3>Koppel jouw Admarkt Marktplaats account</h3>
|
81 |
+
<p>
|
82 |
+
Koppel je bestaande Marktplaats Admarkt account eenvoudig en veilig aan die van Marktfeed. Je behoudt je eigen Marktplaats account(gegevens). De facturatie tussen Marktplaats en jouw Magento webshop blijft ook zoals je het gewend bent. Heb je nog geen Admarkt account dan ontvang je &euro; 50 starttegoed van Marktplaats. De vouchercode hiervoor ontvang je na aanmelding bij Marktfeed.</p>
|
83 |
+
<h3>
|
84 |
+
Producten importeren via Magento</h3>
|
85 |
+
<p>
|
86 |
+
Koppel eenvoudig jouw Magento webshop aan Marktfeed via de beschikbare plug-in om je producten te importeren. Simpel en zonder technische kennis te gebruiken.</p>
|
87 |
+
<h3>Rubrieken koppelen</h3>
|
88 |
+
<p>
|
89 |
+
Kies (eenmalig) de juiste rubrieken en bijbehorende kenmerken van Marktplaats. De mappingtool van Marktfeed helpt je hier grotendeels bij, maar je kan ook geavanceerde regels bepalen. De uitgebreide rubriekenstructuur zorgt ervoor dat je kwalitatief goede advertenties kan maken door de juiste kenmerken te gebruiken die bij jouw producten horen. Hierdoor worden je advertenties beter gevonden.
|
90 |
+
</p>
|
91 |
+
<h3>Advertenties plaatsen op Marktplaats</h3>
|
92 |
+
<p>
|
93 |
+
Je advertenties worden automatisch aangemaakt binnen Marktfeed met de gegevens uit je Magento-shop. Vanuit je advertentiecockpit heb je complete controle over je plaatsingen bij Marktplaats. Naast overzichtelijk beheer van je kosten per klik, budgetten en advertentie-statussen heeft Marktfeed nog een aantal superhandige tools waar je vrolijk van wordt.
|
94 |
+
</p>
|
95 |
+
<h3>Doel bereikt: Synchronisatie en real-time statistieken</h3>
|
96 |
+
<p>
|
97 |
+
Marktfeed en Marktplaats hebben een realtime koppeling waardoor je advertenties altijd kloppen met je aanbod binnen je Magento webshop. De statistieken van je advertenties zijn tevens realtime, deze mailen we je maandelijks. Gebruik de utm-tagging-tool van Marktfeed om de resultaten en verkopen binnen Analytics te meten. Nu gebruik je Marktfeed als handige tool om advertentieplaatsingen op Marktplaats volledig te automatiseren en je verkoop te optimaliseren!</p></description>
|
98 |
<notes>Initial release</notes>
|
99 |
<authors><author><name>EasyAds</name><user>MAG002936376</user><email>development@easyads.eu</email></author></authors>
|
100 |
+
<date>2016-02-01</date>
|
101 |
+
<time>12:07:01</time>
|
102 |
<contents><target name="magecommunity"><dir name="Marktfeed"><dir name="Api"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="dcb4ad0381bba57dea30856aeed6f1f7"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="State.php" hash="f32e32ac1887fe8f6a386e34cdbb92a7"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="f85529026c61208f0c8105c8bdb6c34d"/></dir><dir name="Model"><file name="Access.php" hash="f37466fbbdd5c0ee2acbd96944d20f9c"/><file name="Api.php" hash="5e6b7bcde06b869283cd0d3cc54c5af1"/></dir><dir name="controllers"><file name="ConfigController.php" hash="c1fb8e4e65836ce8083dec56fe4d1b32"/></dir><dir name="etc"><file name="api.xml" hash="da3e60fecea102158a2b51ef86fe8a73"/><file name="config.xml" hash="0c7f26c3fb4890c5c461e70c088c3594"/><file name="system.xml" hash="11d95131a1dad9aafa2999b7ba8b9139"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Marktfeed_Api.xml" hash="90686744467ac041b7e72163d7f05432"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="marktfeed"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="d57f28440074ae93c0be2b08662e1fab"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="nl_NL"><file name="Marktfeed_Api.csv" hash="08fb93e07fc895e2644df8cc85e517f5"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="marktfeed"><file name="connected.png" hash="b4ea92038d64fe62aaf9ccd78214d026"/><file name="disconnected.png" hash="b48ea8cabc59712048c74ed72728dedc"/><file name="logo-marktfeed.png" hash="f6ab9dd2ea5701e46daaa29ea42a5e9c"/></dir></dir></dir></dir></dir></target></contents>
|
103 |
<compatible/>
|
104 |
+
<dependencies><required><php><min>5.2.0</min><max>7.1.0</max></php></required></dependencies>
|
105 |
</package>
|