Version Notes
First release
Download this release
Release Info
Developer | PICT |
Extension | pict |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Pict/FeedBuilder/Helper/Data.php +6 -0
- app/code/community/Pict/FeedBuilder/Model/FeedBuilder.php +248 -0
- app/code/community/Pict/FeedBuilder/controllers/IndexController.php +24 -0
- app/code/community/Pict/FeedBuilder/etc/adminhtml.xml +23 -0
- app/code/community/Pict/FeedBuilder/etc/config.xml +61 -0
- app/code/community/Pict/FeedBuilder/etc/system.xml +124 -0
- app/etc/modules/Pict_FeedBuilder.xml +17 -0
- package.xml +42 -0
app/code/community/Pict/FeedBuilder/Helper/Data.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Pict_FeedBuilder_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
app/code/community/Pict/FeedBuilder/Model/FeedBuilder.php
ADDED
@@ -0,0 +1,248 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Pict_FeedBuilder_Model_FeedBuilder extends Mage_Core_Model_Abstract {
|
4 |
+
|
5 |
+
|
6 |
+
private $fileName = "";
|
7 |
+
|
8 |
+
//http://www.edmondscommerce.co.uk/magento/encryping-data-with-magento/
|
9 |
+
|
10 |
+
|
11 |
+
protected function _construct() {
|
12 |
+
|
13 |
+
parent::_construct();
|
14 |
+
$this->_init('feedbuilder/feedBuilder');
|
15 |
+
}
|
16 |
+
|
17 |
+
public function validateUser( $password) {
|
18 |
+
|
19 |
+
|
20 |
+
if ($password == $this->getPassword())
|
21 |
+
return true;
|
22 |
+
|
23 |
+
|
24 |
+
return false;
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
public function getFeedFilePath() {
|
32 |
+
try {
|
33 |
+
$baseDir = Mage::getBaseDir();
|
34 |
+
$varDir = $baseDir . DS . 'var';
|
35 |
+
$pictfeedDir = $varDir . DS . 'pict_feed';
|
36 |
+
$file = new Varien_Io_File();
|
37 |
+
$file->checkAndCreateFolder($pictfeedDir);
|
38 |
+
$csvFileNamePrefix = Mage::getStoreConfig("pict_extensions_section1/pict_extensions_group2/csv_filename_prefix");
|
39 |
+
|
40 |
+
//$fileName = $csvFileNamePrefix . Mage::getSingleton('core/date')->date('d-m-Y_H-i-s') . '_csv.csv';
|
41 |
+
$fileName = $csvFileNamePrefix . '_csv.csv';
|
42 |
+
|
43 |
+
$this->setFileName($fileName);
|
44 |
+
|
45 |
+
$fileNameWithPath = $pictfeedDir . DS . $fileName;
|
46 |
+
$canWrite = $file->isWriteable($pictfeedDir);
|
47 |
+
|
48 |
+
if (!$canWrite) {
|
49 |
+
throw new Exception('Permission ISSUE please follow this link http://www.magentocommerce.com/wiki/groups/227/resetting_file_permissions');
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
return $fileNameWithPath;
|
56 |
+
} catch (Exception $e) {
|
57 |
+
// echo $e->getMessage();
|
58 |
+
throw new Exception('Something went wrong during creating folder' . $e->getMessage());
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
public function generateProductsFeed() {
|
63 |
+
|
64 |
+
|
65 |
+
try {
|
66 |
+
|
67 |
+
$error = false;
|
68 |
+
; //file generation
|
69 |
+
//Mage::log("generateProductsFeed:: STARTED", null, "generateProductsFeed.log");
|
70 |
+
$feedFilePath = $this->getFeedFilePath();
|
71 |
+
$outPutHeaders = array(
|
72 |
+
'id', //sku
|
73 |
+
'title',
|
74 |
+
'description',
|
75 |
+
'price',
|
76 |
+
'link', // product image url
|
77 |
+
'image_link', //short desc
|
78 |
+
'qty',
|
79 |
+
'meta_title', //categoreis
|
80 |
+
'product_type',
|
81 |
+
'additional_image_link'
|
82 |
+
);
|
83 |
+
$csvData[] = $outPutHeaders;
|
84 |
+
//writing headers
|
85 |
+
$file = fopen($feedFilePath, 'w');
|
86 |
+
//write headers
|
87 |
+
$this->writeData($file, $csvData);
|
88 |
+
|
89 |
+
|
90 |
+
|
91 |
+
|
92 |
+
//paging
|
93 |
+
$pageSize = 100;
|
94 |
+
$collection = Mage::getModel('catalog/product')->getCollection()
|
95 |
+
->addAttributeToFilter('visibility', array('neq' => 1))
|
96 |
+
// Ensure the product is enabled
|
97 |
+
->addAttributeToFilter('status', 1);
|
98 |
+
$productsCount = $collection->count();
|
99 |
+
$loopEnd = ceil($productsCount / $pageSize);
|
100 |
+
//loop via products
|
101 |
+
for ($i = 1; $i <= $loopEnd; $i++) {
|
102 |
+
|
103 |
+
$csvData = array();
|
104 |
+
//writing headers
|
105 |
+
//echo "I am in loop ";
|
106 |
+
$collection = Mage::getModel('catalog/product')->getCollection()
|
107 |
+
|
108 |
+
->addAttributeToSelect('sku')
|
109 |
+
->addAttributeToSelect('name')
|
110 |
+
->addAttributeToSelect('price')
|
111 |
+
->addAttributeToSelect('short_description')
|
112 |
+
->addAttributeToSelect('meta_title')
|
113 |
+
// Ensure the product is visible
|
114 |
+
->addAttributeToFilter('visibility', array('neq' => 1))
|
115 |
+
// Ensure the product is enabled
|
116 |
+
->addAttributeToFilter('status', 1)
|
117 |
+
->addAttributeToSort('entity_id', 'desc')
|
118 |
+
->setPage($i, $pageSize);
|
119 |
+
if (Mage::helper('catalog')->isModuleEnabled('Mage_CatalogInventory')) {
|
120 |
+
$collection->joinField('qty', 'cataloginventory/stock_item', 'qty', 'product_id=entity_id', '{{table}}.stock_id=1', 'left');
|
121 |
+
}
|
122 |
+
|
123 |
+
// echo "Going to Split tht";
|
124 |
+
#$product_collection->getSelect()->limit(1, 1); //where $limit will be the number of results we want, $starting_from will be the index of the result set to be considered as starting point (note 0 is the index of first row)
|
125 |
+
// echo "<br>TOTAL NEW COUNT RESULTS : " . count($collection);
|
126 |
+
// echo "<br>PAGE NO : " . $i;
|
127 |
+
|
128 |
+
foreach ($collection->getItems() as $_product) {
|
129 |
+
|
130 |
+
$productRow = array();
|
131 |
+
$productRow['id'] = $_product->getSku(); //product's sku
|
132 |
+
$productRow['title'] = $_product->getName(); //product name
|
133 |
+
$productRow['description'] = $_product->getShortDescription(); //product's short description
|
134 |
+
//$productRow['abc']= $_product->getDescription(); // product's long description
|
135 |
+
$productRow['price'] = $_product->getPrice(); //product's regular Price
|
136 |
+
//$productRow['special_price']= $_product->getSpecialPrice(); //product's special Price
|
137 |
+
$productRow['link'] = $_product->getProductUrl(); //product url
|
138 |
+
$productRow['image_link'] = $_product->getImageUrl(); //product's image url
|
139 |
+
$productRow['qty'] = $_product->getQty(); // product's QTY
|
140 |
+
$productRow['meta_title'] = $_product->getMetaTitle();
|
141 |
+
|
142 |
+
//render categories
|
143 |
+
$categories = $_product->getCategoryCollection()->addAttributeToSelect('name');
|
144 |
+
$categoriesNames = "";
|
145 |
+
foreach ($categories as $category) {
|
146 |
+
$categoriesNames.=$category->getName() . ";";
|
147 |
+
}
|
148 |
+
$productRow['product_type'] = $categoriesNames;
|
149 |
+
$galleryImages = "";
|
150 |
+
|
151 |
+
$product = Mage::getModel('catalog/product')->load($_product->getId());
|
152 |
+
foreach ($product->getMediaGalleryImages() as $image) {
|
153 |
+
|
154 |
+
$galleryImages.=$image->getUrl(). ";";
|
155 |
+
}
|
156 |
+
|
157 |
+
$productRow['additional_image_link'] = $galleryImages;
|
158 |
+
//wring products to
|
159 |
+
$csvData[] = $productRow;
|
160 |
+
$file = fopen($feedFilePath, 'a');
|
161 |
+
$this->writeData($file, $csvData);
|
162 |
+
unset($_product);
|
163 |
+
unset($categories);
|
164 |
+
unset($productRow);
|
165 |
+
unset($csvData);
|
166 |
+
|
167 |
+
}
|
168 |
+
unset($collection);
|
169 |
+
}
|
170 |
+
} catch (Exception $e) {
|
171 |
+
$error = true;
|
172 |
+
throw new Exception(('Something went wrong during product read') . $e->getMessage());
|
173 |
+
}
|
174 |
+
|
175 |
+
//var_dump($feed);
|
176 |
+
|
177 |
+
|
178 |
+
}
|
179 |
+
|
180 |
+
|
181 |
+
|
182 |
+
public function getPassword() {
|
183 |
+
return Mage::getStoreConfig("pict_extensions_section1/pict_extensions_group1/password");
|
184 |
+
}
|
185 |
+
|
186 |
+
|
187 |
+
public function getFileName() {
|
188 |
+
return $this->fileName;
|
189 |
+
}
|
190 |
+
|
191 |
+
public function setFileName($fname) {
|
192 |
+
$this->fileName = $fname;
|
193 |
+
}
|
194 |
+
|
195 |
+
|
196 |
+
|
197 |
+
public function writeData($file, $data) {
|
198 |
+
$_delimiter = Mage::getStoreConfig("pict_extensions_section1/pict_extensions_group2/feild_delim");
|
199 |
+
|
200 |
+
if (ord($_delimiter) == 92)
|
201 |
+
$_delimiter = "\t";
|
202 |
+
|
203 |
+
$_enclosure = Mage::getStoreConfig("pict_extensions_section1/pict_extensions_group2/field_enclosure");
|
204 |
+
$fh = $file; //fopen($file, 'a');
|
205 |
+
foreach ($data as $dataRow) {
|
206 |
+
$this->fputcsv($fh, $dataRow, $_delimiter, $_enclosure);
|
207 |
+
}
|
208 |
+
fclose($fh);
|
209 |
+
return $this;
|
210 |
+
}
|
211 |
+
|
212 |
+
public function fputcsv(&$handle, $fields = array(), $delimiter = ',', $enclosure = '"') {
|
213 |
+
$str = '';
|
214 |
+
$escape_char = '\\';
|
215 |
+
foreach ($fields as $value) {
|
216 |
+
if (strpos($value, $delimiter) !== false ||
|
217 |
+
strpos($value, $enclosure) !== false ||
|
218 |
+
strpos($value, "\n") !== false ||
|
219 |
+
strpos($value, "\r") !== false ||
|
220 |
+
strpos($value, "\t") !== false ||
|
221 |
+
strpos($value, ' ') !== false) {
|
222 |
+
$str2 = $enclosure;
|
223 |
+
$escaped = 0;
|
224 |
+
$len = strlen($value);
|
225 |
+
for ($i = 0; $i < $len; $i++) {
|
226 |
+
if ($value[$i] == $escape_char) {
|
227 |
+
$escaped = 1;
|
228 |
+
} else if (!$escaped && $value[$i] == $enclosure) {
|
229 |
+
$str2 .= $enclosure;
|
230 |
+
} else {
|
231 |
+
$escaped = 0;
|
232 |
+
}
|
233 |
+
$str2 .= $value[$i];
|
234 |
+
}
|
235 |
+
$str2 .= $enclosure;
|
236 |
+
$str .= $str2 . $delimiter;
|
237 |
+
} else {
|
238 |
+
$str .= $enclosure . $value . $enclosure . $delimiter;
|
239 |
+
}
|
240 |
+
}
|
241 |
+
$str = substr($str, 0, -1);
|
242 |
+
$str .= "\n";
|
243 |
+
return fwrite($handle, $str);
|
244 |
+
}
|
245 |
+
|
246 |
+
}
|
247 |
+
|
248 |
+
|
app/code/community/Pict/FeedBuilder/controllers/IndexController.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Pict_FeedBuilder_IndexController extends Mage_Core_Controller_Front_Action {
|
4 |
+
|
5 |
+
public function IndexAction() {
|
6 |
+
|
7 |
+
//$username = $this->getRequest()->getParam('username');
|
8 |
+
$password = $this->getRequest()->getParam('secret');
|
9 |
+
$requested_file = $this->getRequest()->getParam('requested_file');
|
10 |
+
$isUserValidated = Mage::getModel('feedbuilder/feedBuilder')->validateUser($password);
|
11 |
+
//$isUserValidated=true;
|
12 |
+
if ($isUserValidated) {
|
13 |
+
///build product file
|
14 |
+
|
15 |
+
$feedBuilder = Mage::getModel('feedbuilder/feedBuilder');
|
16 |
+
$filePath = $feedBuilder->getFeedFilePath();
|
17 |
+
$feedBuilder->generateProductsFeed();
|
18 |
+
echo file_get_contents($filePath);
|
19 |
+
//$this->_prepareDownloadResponse($feedBuilder->getFileName(), file_get_contents($filePath));
|
20 |
+
return;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
}
|
app/code/community/Pict/FeedBuilder/etc/adminhtml.xml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<system>
|
8 |
+
<children>
|
9 |
+
<config>
|
10 |
+
<children>
|
11 |
+
<pict_extensions_section1 translate="title" module="feedbuilder">
|
12 |
+
<title>Products Feed Builder Section</title>
|
13 |
+
<sort_order>0</sort_order>
|
14 |
+
</pict_extensions_section1>
|
15 |
+
</children>
|
16 |
+
</config>
|
17 |
+
</children>
|
18 |
+
</system>
|
19 |
+
</children>
|
20 |
+
</admin>
|
21 |
+
</resources>
|
22 |
+
</acl>
|
23 |
+
</config>
|
app/code/community/Pict/FeedBuilder/etc/config.xml
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Pict_FeedBuilder>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Pict_FeedBuilder>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<pict>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Pict_FeedBuilder</module>
|
14 |
+
<frontName>pict</frontName>
|
15 |
+
</args>
|
16 |
+
</pict>
|
17 |
+
</routers>
|
18 |
+
<!-- <layout>
|
19 |
+
<updates>
|
20 |
+
<pict>
|
21 |
+
<file>feedbuilder.xml</file>
|
22 |
+
</pict>
|
23 |
+
</updates>
|
24 |
+
</layout>-->
|
25 |
+
</frontend>
|
26 |
+
<global>
|
27 |
+
<helpers>
|
28 |
+
<feedbuilder>
|
29 |
+
<class>Pict_FeedBuilder_Helper</class>
|
30 |
+
</feedbuilder>
|
31 |
+
</helpers>
|
32 |
+
|
33 |
+
<models>
|
34 |
+
<feedbuilder>
|
35 |
+
<class>Pict_FeedBuilder_Model</class>
|
36 |
+
|
37 |
+
</feedbuilder>
|
38 |
+
|
39 |
+
</models>
|
40 |
+
|
41 |
+
</global>
|
42 |
+
|
43 |
+
|
44 |
+
<default>
|
45 |
+
<pict_extensions_section1>
|
46 |
+
<pict_extensions_group1>
|
47 |
+
<!-- <user_name>Your User Name to Build Feed By URL</user_name> -->
|
48 |
+
<password>pict_secret_9081</password>
|
49 |
+
<!-- <feed_url>www.examplesite.com/index.php/feedbuilder/?username={username}&password={password}</feed_url> -->
|
50 |
+
<!-- <user_email>Email Address</user_email>-->
|
51 |
+
<!-- <is_feed_email_send>0</is_feed_email_send> -->
|
52 |
+
</pict_extensions_group1>
|
53 |
+
<pict_extensions_group2>
|
54 |
+
<feild_delim>\t</feild_delim>
|
55 |
+
<field_enclosure>"</field_enclosure>
|
56 |
+
<csv_filename_prefix>pict_feed_</csv_filename_prefix>
|
57 |
+
|
58 |
+
</pict_extensions_group2>
|
59 |
+
</pict_extensions_section1>
|
60 |
+
</default>
|
61 |
+
</config>
|
app/code/community/Pict/FeedBuilder/etc/system.xml
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<pict_extensions_tab1 translate="label" module="feedbuilder">
|
5 |
+
<label>PICT Extensions</label>
|
6 |
+
<sort_order>6</sort_order>
|
7 |
+
</pict_extensions_tab1>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<pict_extensions_section1 translate="label" module="feedbuilder">
|
11 |
+
<label>Products Feed Builder</label>
|
12 |
+
<tab>pict_extensions_tab1</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>0</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<pict_extensions_group1 translate="label">
|
20 |
+
<label>Products Feed Builder Settings</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<sort_order>0</sort_order>
|
23 |
+
<show_in_default>1</show_in_default>
|
24 |
+
<show_in_website>1</show_in_website>
|
25 |
+
<show_in_store>1</show_in_store>
|
26 |
+
<fields>
|
27 |
+
<!-- <user_name translate="label">
|
28 |
+
<label>User Name</label>
|
29 |
+
<frontend_type>text</frontend_type>
|
30 |
+
<sort_order>2</sort_order>
|
31 |
+
<show_in_default>1</show_in_default>
|
32 |
+
<show_in_website>1</show_in_website>
|
33 |
+
<show_in_store>1</show_in_store>
|
34 |
+
<comment>Feed Builder User Name</comment>
|
35 |
+
<validate>required-entry</validate>
|
36 |
+
</user_name>-->
|
37 |
+
<password translate="label">
|
38 |
+
<label>PICT Secret</label>
|
39 |
+
<frontend_type>text</frontend_type>
|
40 |
+
<sort_order>3</sort_order>
|
41 |
+
<show_in_default>1</show_in_default>
|
42 |
+
<show_in_website>1</show_in_website>
|
43 |
+
<show_in_store>1</show_in_store>
|
44 |
+
<comment>PICT Secret to build file for example http://testsite.com/index.php/pict/?secret=admin123</comment>
|
45 |
+
<validate>required-entry</validate>
|
46 |
+
</password>
|
47 |
+
<!-- <feed_url translate="label">
|
48 |
+
<label>URL</label>
|
49 |
+
<frontend_type>label</frontend_type>
|
50 |
+
<sort_order>0</sort_order>
|
51 |
+
<show_in_default>1</show_in_default>
|
52 |
+
<show_in_website>1</show_in_website>
|
53 |
+
<show_in_store>1</show_in_store>
|
54 |
+
<comment>Please Save to get the url to generate the feed</comment>
|
55 |
+
</feed_url>-->
|
56 |
+
<!-- <user_email translate="label">
|
57 |
+
<label>Email Address</label>
|
58 |
+
<frontend_type>text</frontend_type>
|
59 |
+
<sort_order>1</sort_order>
|
60 |
+
<show_in_default>1</show_in_default>
|
61 |
+
<show_in_website>1</show_in_website>
|
62 |
+
<show_in_store>1</show_in_store>
|
63 |
+
<comment>User Email Address</comment>
|
64 |
+
<validate>required-email</validate>
|
65 |
+
<validate>required-entry</validate>
|
66 |
+
</user_email>-->
|
67 |
+
<!-- <is_feed_email_send translate="label">
|
68 |
+
<label>Send Feed Link By Email</label>
|
69 |
+
<frontend_type>select</frontend_type>
|
70 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
71 |
+
<sort_order>0</sort_order>
|
72 |
+
<show_in_default>1</show_in_default>
|
73 |
+
<show_in_website>1</show_in_website>
|
74 |
+
<show_in_store>1</show_in_store>
|
75 |
+
<comment>Feed Link would be send if its enable</comment>
|
76 |
+
</is_feed_email_send>-->
|
77 |
+
</fields>
|
78 |
+
</pict_extensions_group1>
|
79 |
+
<pict_extensions_group2 translate="label">
|
80 |
+
<label>CSV Options</label>
|
81 |
+
<frontend_type>text</frontend_type>
|
82 |
+
<sort_order>1</sort_order>
|
83 |
+
<show_in_default>1</show_in_default>
|
84 |
+
<show_in_website>1</show_in_website>
|
85 |
+
<show_in_store>1</show_in_store>
|
86 |
+
<fields>
|
87 |
+
<feild_delim translate="label">
|
88 |
+
<label>Field Delimiter</label>
|
89 |
+
<frontend_type>text</frontend_type>
|
90 |
+
<sort_order>0</sort_order>
|
91 |
+
<show_in_default>1</show_in_default>
|
92 |
+
<show_in_website>1</show_in_website>
|
93 |
+
<show_in_store>1</show_in_store>
|
94 |
+
<comment>Field Delimiter </comment>
|
95 |
+
<validate>required-entry</validate>
|
96 |
+
</feild_delim>
|
97 |
+
<field_enclosure translate="label">
|
98 |
+
<label>Field Enclosure </label>
|
99 |
+
<frontend_type>text</frontend_type>
|
100 |
+
<sort_order>0</sort_order>
|
101 |
+
<show_in_default>1</show_in_default>
|
102 |
+
<show_in_website>1</show_in_website>
|
103 |
+
<show_in_store>1</show_in_store>
|
104 |
+
<comment>Field Enclosure </comment>
|
105 |
+
<validate>required-entry</validate>
|
106 |
+
</field_enclosure>
|
107 |
+
<csv_filename_prefix translate="label">
|
108 |
+
<label>File Name Prefix</label>
|
109 |
+
<frontend_type>text</frontend_type>
|
110 |
+
<sort_order>0</sort_order>
|
111 |
+
<show_in_default>1</show_in_default>
|
112 |
+
<show_in_website>1</show_in_website>
|
113 |
+
<show_in_store>1</show_in_store>
|
114 |
+
<comment>File Name Prefix </comment>
|
115 |
+
</csv_filename_prefix>
|
116 |
+
</fields>
|
117 |
+
</pict_extensions_group2>
|
118 |
+
</groups>
|
119 |
+
</pict_extensions_section1>
|
120 |
+
</sections>
|
121 |
+
</config>
|
122 |
+
|
123 |
+
|
124 |
+
|
app/etc/modules/Pict_FeedBuilder.xml
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @category Pict
|
5 |
+
* @package Pict_FeedBuilder
|
6 |
+
* @author ModuleCreator
|
7 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
8 |
+
*/
|
9 |
+
-->
|
10 |
+
<config>
|
11 |
+
<modules>
|
12 |
+
<Pict_FeedBuilder>
|
13 |
+
<active>true</active>
|
14 |
+
<codePool>community</codePool>
|
15 |
+
</Pict_FeedBuilder>
|
16 |
+
</modules>
|
17 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>pict</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>GNU General Public License</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Make the photos you share to social networks shoppable. Magento extension needed for using PICT.</summary>
|
10 |
+
<description>Let the world shop the photos you share to social networks. 
|
11 |
+

|
12 |
+
In the same manner that you can tag a friend in a Facebook photo and see that tag in the Facebook news feed, PICT allow brands to tag their products in photos and let the world shop the products in those photos from the Facebook feed. 
|
13 |
+

|
14 |
+
This extension requires FREE registration at www.PICT.com 
|
15 |
+

|
16 |
+
Setup takes minutes and does not require any coding. 
|
17 |
+

|
18 |
+
How It Works
|
19 |
+

|
20 |
+
Snap or Upload
|
21 |
+

|
22 |
+
Use our web application to upload a photo from your computer, or snap a photo using the PICT iPhone app. 
|
23 |
+

|
24 |
+
Tag
|
25 |
+

|
26 |
+
Tagging a product is as simple as tagging a friend on Facebook 
|
27 |
+

|
28 |
+
Share
|
29 |
+

|
30 |
+
With the click of a button, share PICT photos to Facebook, Twitter, Pinterest, Tumblr, and Instagram. 
|
31 |
+

|
32 |
+
Measure
|
33 |
+

|
34 |
+
See which photos and products are generating the most revenue and driving the most engagement. </description>
|
35 |
+
<notes>First release</notes>
|
36 |
+
<authors><author><name>PICT</name><user>PICT</user><email>operations@pict.com</email></author><author><name>Sajid Hussain</name><user>sajidunnar</user><email>sajidunnar@gmail.com</email></author></authors>
|
37 |
+
<date>2013-04-12</date>
|
38 |
+
<time>21:35:38</time>
|
39 |
+
<contents><target name="magecommunity"><dir name="Pict"><dir name="FeedBuilder"><dir name="Helper"><file name="Data.php" hash="87cd964b8008e8c0f4b706f49a6a13e8"/></dir><dir name="Model"><file name="FeedBuilder.php" hash="f22359c9c5b9341aa25a276e929e1983"/></dir><dir name="controllers"><file name="IndexController.php" hash="c4d5d1b324b666671aece80a7e7b0ec3"/></dir><dir name="etc"><file name="adminhtml.xml" hash="6a201b46b9c28faea2167d4111477f71"/><file name="config.xml" hash="8f99ba6d5026b1092332b9ccb29dea28"/><file name="system.xml" hash="2737718479917c321154e2250bc154ee"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Pict_FeedBuilder.xml" hash="4a1e7926edb8f612583951ae57cd07d8"/></dir></target></contents>
|
40 |
+
<compatible/>
|
41 |
+
<dependencies><required><php><min>5.2.0</min><max>5.3.22</max></php></required></dependencies>
|
42 |
+
</package>
|