pict - Version 1.0.1

Version Notes

First Release

Download this release

Release Info

Developer PICT
Extension pict
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/community/Pict/FeedBuilder/Model/FeedBuilder.php CHANGED
@@ -68,17 +68,18 @@ class Pict_FeedBuilder_Model_FeedBuilder extends Mage_Core_Model_Abstract {
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
@@ -124,6 +125,9 @@ class Pict_FeedBuilder_Model_FeedBuilder extends Mage_Core_Model_Abstract {
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
 
@@ -135,7 +139,7 @@ class Pict_FeedBuilder_Model_FeedBuilder extends Mage_Core_Model_Abstract {
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
 
@@ -146,13 +150,30 @@ class Pict_FeedBuilder_Model_FeedBuilder extends Mage_Core_Model_Abstract {
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
68
  ; //file generation
69
  //Mage::log("generateProductsFeed:: STARTED", null, "generateProductsFeed.log");
70
  $feedFilePath = $this->getFeedFilePath();
71
+ $outPutHeaders = array(
72
  'id', //sku
73
+ 'name',
74
  'description',
75
  'price',
76
+ 'product_url', // product image url
 
77
  'qty',
78
  'meta_title', //categoreis
79
+ 'categories',
80
+ 'image_link', //short desc
81
+ 'additional_image_link',
82
+
83
  );
84
  $csvData[] = $outPutHeaders;
85
  //writing headers
125
  #$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)
126
  // echo "<br>TOTAL NEW COUNT RESULTS : " . count($collection);
127
  // echo "<br>PAGE NO : " . $i;
128
+
129
+
130
+
131
 
132
  foreach ($collection->getItems() as $_product) {
133
 
139
  $productRow['price'] = $_product->getPrice(); //product's regular Price
140
  //$productRow['special_price']= $_product->getSpecialPrice(); //product's special Price
141
  $productRow['link'] = $_product->getProductUrl(); //product url
142
+ //$productRow['image_link'] = $_product->getImageUrl(); //product's image url
143
  $productRow['qty'] = $_product->getQty(); // product's QTY
144
  $productRow['meta_title'] = $_product->getMetaTitle();
145
 
150
  $categoriesNames.=$category->getName() . ";";
151
  }
152
  $productRow['product_type'] = $categoriesNames;
153
+ $galleryImages = "";
154
 
155
+ $product = Mage::getModel('catalog/product')->load($_product->getId());
156
+
157
+ $baseImage=false;
158
+ $baseImageUrl="";
159
  foreach ($product->getMediaGalleryImages() as $image) {
160
+ if($baseImage==false)
161
+ {
162
+ $baseImageUrl= $image->getUrl();
163
+ $baseImage=true;
164
+ continue;
165
+ }
166
 
167
  $galleryImages.=$image->getUrl(). ";";
168
  }
169
+ $productRow['image_link'] =$baseImageUrl;
170
+ // $productRow['gallery'] = $galleryImages;
171
+
172
+
173
+ // foreach ($product->getMediaGalleryImages() as $image) {
174
+
175
+ // $galleryImages.=$image->getUrl(). ";";
176
+ // }
177
 
178
  $productRow['additional_image_link'] = $galleryImages;
179
  //wring products to
app/code/community/Pict/FeedBuilder/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Pict_FeedBuilder>
5
- <version>1.0.0</version>
6
  </Pict_FeedBuilder>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <Pict_FeedBuilder>
5
+ <version>1.0.1</version>
6
  </Pict_FeedBuilder>
7
  </modules>
8
  <frontend>
package.xml CHANGED
@@ -1,42 +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. &#xD;
11
- &#xD;
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. &#xD;
13
- &#xD;
14
- This extension requires FREE registration at www.PICT.com &#xD;
15
- &#xD;
16
- Setup takes minutes and does not require any coding. &#xD;
17
- &#xD;
18
- How It Works&#xD;
19
- &#xD;
20
- Snap or Upload&#xD;
21
- &#xD;
22
- Use our web application to upload a photo from your computer, or snap a photo using the PICT iPhone app. &#xD;
23
- &#xD;
24
- Tag&#xD;
25
- &#xD;
26
- Tagging a product is as simple as tagging a friend on Facebook &#xD;
27
- &#xD;
28
- Share&#xD;
29
- &#xD;
30
- With the click of a button, share PICT photos to Facebook, Twitter, Pinterest, Tumblr, and Instagram. &#xD;
31
- &#xD;
32
- Measure&#xD;
33
- &#xD;
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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>pict</name>
4
+ <version>1.0.1</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. &amp;#xD;&#xD;
11
+ &amp;#xD;&#xD;
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. &amp;#xD;&#xD;
13
+ &amp;#xD;&#xD;
14
+ This extension requires FREE registration at www.PICT.com &amp;#xD;&#xD;
15
+ &amp;#xD;&#xD;
16
+ Setup takes minutes and does not require any coding. &amp;#xD;&#xD;
17
+ &amp;#xD;&#xD;
18
+ How It Works&amp;#xD;&#xD;
19
+ &amp;#xD;&#xD;
20
+ Snap or Upload&amp;#xD;&#xD;
21
+ &amp;#xD;&#xD;
22
+ Use our web application to upload a photo from your computer, or snap a photo using the PICT iPhone app. &amp;#xD;&#xD;
23
+ &amp;#xD;&#xD;
24
+ Tag&amp;#xD;&#xD;
25
+ &amp;#xD;&#xD;
26
+ Tagging a product is as simple as tagging a friend on Facebook &amp;#xD;&#xD;
27
+ &amp;#xD;&#xD;
28
+ Share&amp;#xD;&#xD;
29
+ &amp;#xD;&#xD;
30
+ With the click of a button, share PICT photos to Facebook, Twitter, Pinterest, Tumblr, and Instagram. &amp;#xD;&#xD;
31
+ &amp;#xD;&#xD;
32
+ Measure&amp;#xD;&#xD;
33
+ &amp;#xD;&#xD;
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 Unar</name><user>sajidunnar</user><email>sajidunnar@gmail.com</email></author></authors>
37
+ <date>2013-04-18</date>
38
+ <time>22:37:58</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="ddd3646280217576846b20a68136b81c"/></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="2b1971dc6ab294f148e0d6feec9ac34d"/><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>