Facebookstore2 - Version 2.0.2

Version Notes

FacebookStore version 2.0.2

Download this release

Release Info

Developer Ali Halabyah
Extension Facebookstore2
Version 2.0.2
Comparing to
See all releases


Version 2.0.2

app/code/local/Shopgo/FacebookStore/Block/Adminhtml/Version.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Shopgo_FacebookStore_Block_Adminhtml_Version extends Mage_Adminhtml_Block_System_Config_Form_Field
4
+ {
5
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ return (string) Mage::helper('facebookstore')->getExtensionVersion();
8
+ }
9
+ }
app/code/local/Shopgo/FacebookStore/Helper/Data.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category Shopgo
4
+ * @package Shopgo_FacebookStore
5
+ * @author ali@shopgo.me
6
+ */
7
+ class Shopgo_FacebookStore_Helper_Data extends Mage_Core_Helper_Abstract
8
+ {
9
+ // Retrieve current installed version
10
+ public function getExtensionVersion()
11
+ {
12
+ return (string) Mage::getConfig()->getNode()->modules->Shopgo_FacebookStore->version;
13
+ }
14
+ }
app/code/local/Shopgo/FacebookStore/Model/Category/Api.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Rewrites original Mage_Catalog_Model_Product_Api to limit result set.
5
+ *
6
+ * @category Shopgo
7
+ * @package Shopgo_FacebookStore
8
+ * @author ali@shopgo.me
9
+ * @see Mage_Catalog_Model_Product_Api::items
10
+ */
11
+ class Shopgo_FacebookStore_Model_Category_Api extends Mage_Catalog_Model_Category_Api
12
+ {
13
+
14
+ function Shopgo_FacebookStore_Model_Category_Api() {
15
+ parent::__construct();
16
+ }
17
+
18
+ /**
19
+ * Retrieve list of assigned products to category
20
+ *
21
+ * @param int $categoryId
22
+ * @param string|int $store
23
+ * @return array
24
+ */
25
+ public function assignedProducts($categoryId, $store = null)
26
+ {
27
+ // set current store view
28
+ Mage::app()->setCurrentStore($store);
29
+
30
+ $category = $this->_initCategory($categoryId);
31
+
32
+ $storeId = $this->_getStoreId($store);
33
+ $collection = $category->setStoreId($storeId)->getProductCollection();
34
+ ($storeId == 0)? $collection->addOrder('position', 'asc') : $collection->setOrder('position', 'asc');
35
+ $collection->addAttributeToSelect('*');
36
+
37
+ $collection->addAttributeToFilter('status', 1);
38
+ $collection->addAttributeToFilter('visibility', 4);
39
+
40
+ $currencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
41
+ $currencySymbol = Mage::app()->getLocale()->currency($currencyCode)->getSymbol();
42
+
43
+ $result = array();
44
+ foreach ($collection as $product) {
45
+ $img = Mage::getModel('catalog/product')->load($product->getId())->getImageUrl();
46
+
47
+ $price_no_symbol = Mage::getModel('directory/currency')->format(
48
+ $product->getFinalPrice(),
49
+ array('display'=>Zend_Currency::NO_SYMBOL),
50
+ false
51
+ );
52
+
53
+ $final_price = Mage::helper('core')->currency($product->getFinalPrice(),true,false);
54
+
55
+ $result[] = array(
56
+ 'product_id' => $product->getId(),
57
+ 'type' => $product->getTypeId(),
58
+ 'set' => $product->getAttributeSetId(),
59
+ 'sku' => $product->getSku(),
60
+ 'position' => $product->getCatIndexPosition(),
61
+ 'img' => Mage::helper('catalog/image')->init($product, 'image')
62
+ ->constrainOnly(true)
63
+ ->keepAspectRatio(true)
64
+ // ->keepFrame(false)
65
+ ->resize(450)
66
+ ->__toString(),
67
+ 'product_id' => $product->getId(),
68
+ 'sku' => $product->getSku(),
69
+ 'name' => $product->getName(),
70
+ 'url' => $product->getProductUrl(),
71
+ 'short_description' => $product->getShortDescription(),
72
+ 'description' => $product->getDescription(),
73
+ 'price' => $final_price,
74
+ 'set' => $product->getAttributeSetId(),
75
+ 'type' => $product->getTypeId(),
76
+ 'category_ids' => $product->getCategoryIds(),
77
+ 'cart_url' => Mage::getUrl('checkout/cart/add', array('product' => $product->getId()))
78
+ );
79
+ }
80
+ return $result;
81
+ }
82
+ }
app/code/local/Shopgo/FacebookStore/Model/Product/Api.php ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Rewrites original Mage_Catalog_Model_Product_Api to limit result set.
5
+ *
6
+ * @category Shopgo
7
+ * @package Shopgo_FacebookStore
8
+ * @author ali@shopgo.me
9
+ * @see Mage_Catalog_Model_Product_Api::items
10
+ */
11
+ class Shopgo_FacebookStore_Model_Product_Api extends Mage_Catalog_Model_Product_Api
12
+ {
13
+
14
+ function Shopgo_FacebookStore_Model_Product_Api() {
15
+ parent::__construct();
16
+ }
17
+
18
+ public function items($filters = null, $store = null)
19
+ {
20
+ /**
21
+ *
22
+ */
23
+ $visibility = array(
24
+ Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
25
+ Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG
26
+ );
27
+
28
+ // set current store view
29
+ Mage::app()->setCurrentStore($store);
30
+
31
+ $collection = Mage::getModel('catalog/product')->getCollection()
32
+ ->addStoreFilter($this->_getStoreId($store))
33
+ ->addAttributeToSelect('*');
34
+
35
+ $collection->addAttributeToFilter('status', 1);
36
+ $collection->addAttributeToFilter('visibility', $visibility);
37
+
38
+ // $collection->addAttributeToFilter('type_id', array('eq' => 'simple'));
39
+
40
+ $currencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
41
+ $currencySymbol = Mage::app()->getLocale()->currency($currencyCode)->getSymbol();
42
+
43
+ /** @var $apiHelper Mage_Api_Helper_Data */
44
+ $apiHelper = Mage::helper('api');
45
+ $filters = $apiHelper->parseFilters($filters, $this->_filtersMap);
46
+ try {
47
+ foreach ($filters as $field => $value) {
48
+ $collection->addFieldToFilter($field, $value);
49
+ }
50
+ } catch (Mage_Core_Exception $e) {
51
+ $this->_fault('filters_invalid', $e->getMessage());
52
+ }
53
+
54
+ $result = array();
55
+ foreach ($collection as $product) {
56
+
57
+ $price_no_symbol = Mage::getModel('directory/currency')->format(
58
+ $product->getFinalPrice(),
59
+ array('display'=>Zend_Currency::NO_SYMBOL),
60
+ false
61
+ );
62
+
63
+ $final_price = Mage::helper('core')->currency($product->getFinalPrice(),true,false);
64
+
65
+ $result[] = array(
66
+ 'product_id' => $product->getId(),
67
+ 'sku' => $product->getSku(),
68
+ 'name' => $product->getName(),
69
+ 'url' => $product->getProductUrl(),
70
+ 'short_description' => $product->getShortDescription(),
71
+ 'description' => $product->getDescription(),
72
+ 'price' => $final_price,
73
+ 'currency_code' => $currencyCode,
74
+ 'currency_symbol' => $currencySymbol,
75
+ 'img' => Mage::helper('catalog/image')->init($product, 'image')
76
+ ->constrainOnly(true)
77
+ ->keepAspectRatio(true)
78
+ // ->keepFrame(false)
79
+ ->resize(450)
80
+ ->__toString(),
81
+ 'set' => $product->getAttributeSetId(),
82
+ 'type' => $product->getTypeId(),
83
+ 'category_ids' => $product->getCategoryIds(),
84
+ 'website_ids' => $product->getWebsiteIds(),
85
+ 'cart_url' => Mage::getUrl('checkout/cart/add', array('product' => $product->getId()))
86
+ );
87
+ }
88
+ return $result;
89
+ }
90
+
91
+ public function info($productId, $store = null, $attributes = null, $identifierType = null)
92
+ {
93
+ // set current store view
94
+ Mage::app()->setCurrentStore($store);
95
+
96
+ $product = $this->_getProduct($productId, $store, $identifierType);
97
+
98
+ $final_price = Mage::helper('core')->currency($product->getFinalPrice(),true,false);
99
+
100
+ $result = array(
101
+ 'product_id' => $product->getId(),
102
+ 'sku' => $product->getSku(),
103
+ 'name' => $product->getName(),
104
+ 'url' => $product->getProductUrl(),
105
+ 'short_description' => $product->getShortDescription(),
106
+ 'description' => $product->getDescription(),
107
+ 'price' => $final_price,
108
+ 'currency_code' => $currencyCode,
109
+ 'currency_symbol' => $currencySymbol,
110
+ 'img' => Mage::helper('catalog/image')->init($product, 'image')
111
+ ->constrainOnly(true)
112
+ ->keepAspectRatio(true)
113
+ // ->keepFrame(false)
114
+ ->resize(450)
115
+ ->__toString(),
116
+ 'set' => $product->getAttributeSetId(),
117
+ 'type' => $product->getTypeId(),
118
+ 'category_ids' => $product->getCategoryIds(),
119
+ 'website_ids' => $product->getWebsiteIds(),
120
+ 'cart_url' => Mage::getUrl('checkout/cart/add', array('product' => $product->getId()))
121
+ );
122
+
123
+ $currencyInfo = $this->getCurrentCurrencyInfo();
124
+
125
+ $result['internal'] = array(
126
+ 'currency' => array(
127
+ 'code' => $currencyInfo['code'],
128
+ 'symbol' => $currencyInfo['symbol'],
129
+ )
130
+ );
131
+
132
+ return $result;
133
+ }
134
+
135
+
136
+ /**
137
+ * Returns array of current currency code and symbol.
138
+ *
139
+ * @return array
140
+ */
141
+ public function getCurrentCurrencyInfo()
142
+ {
143
+ $currencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
144
+ $currencySymbol = Mage::app()->getLocale()->currency($currencyCode)->getSymbol();
145
+
146
+ return array('code' => $currencyCode, 'symbol' => $currencySymbol);
147
+ }
148
+ }
app/code/local/Shopgo/FacebookStore/controllers/IndexController.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Shopgo_FacebookStore_IndexController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+
7
+ if ($this->getRequest()->getParams()) {
8
+ // Mage::getModel('core/cookie')->set("beetailer_ref", $this->getRequest()->getParam('fb_ref'));
9
+ // Mage::getModel('core/cookie')->set("beetailer_ref_date", time());
10
+
11
+ /* Fill shopping cart */
12
+ $cart = Mage::getSingleton('checkout/cart');
13
+ $product_Ids = explode(',',$this->getRequest()->getParam('Product_Ids'));
14
+ $product_Qtys = explode(',',$this->getRequest()->getParam('Product_Qtys'));
15
+
16
+ $sview = $this->getRequest()->getParam('store_view');
17
+ foreach ($product_Ids as $key => $id) {
18
+
19
+ $product = Mage::getModel('catalog/product')
20
+ ->setStoreId(Mage::app()->getStore($sview)->getId())
21
+ ->load($id);
22
+ //var_dump($product);
23
+
24
+
25
+ try{
26
+ $cart->addProduct($product, array(
27
+ 'qty' => $product_Qtys[$key]
28
+ ));
29
+ }catch (Mage_Core_Exception $e) { }
30
+ }
31
+
32
+
33
+ $cart->save();
34
+ Mage::getSingleton('checkout/session')->setCartWasUpdated(true);
35
+
36
+ $this->_redirect('checkout/cart?utm_source=FB&utm_medium=ShopgoFBStore&utm_campaign=FBStore');
37
+
38
+
39
+ }else{
40
+ $this->_redirect('/');
41
+ }
42
+
43
+
44
+ }
45
+ public function ownAction(){
46
+ $pro_id = $this->getRequest()->getParam('id');
47
+ $product = Mage::getModel('catalog/product')->load($pro_id);
48
+
49
+ if($this->getRequest()->getParam('fb_action_ids')){
50
+ header("Location: ".$product->getProductUrl()."");
51
+ die();
52
+ }
53
+
54
+ if($product->getName()=== NULL){
55
+ die('No Product with this id !');
56
+ }
57
+
58
+ echo '
59
+ <!DOCTYPE html>
60
+ <head>
61
+ <meta class="type" property="og:type" content="shopgo_store:store_item" />
62
+ <meta class="url" property="og:url" content="'.Mage::helper('core/url')->getCurrentUrl().'" />
63
+ <meta class="title" property="og:title" content="'.$product->getName().'" />
64
+ <meta class="image" property="og:image" content="'.$product->getImageUrl().'" />
65
+ <meta class="description" property="og:description" content="'.$product->getData('description').'" />
66
+
67
+ </head>
68
+ <body></body>
69
+ </html>
70
+ ';
71
+
72
+ }
73
+
74
+ public function wantAction(){
75
+ $pro_id = $this->getRequest()->getParam('id');
76
+ $product = Mage::getModel('catalog/product')->load($pro_id);
77
+
78
+ if($this->getRequest()->getParam('fb_action_ids')){
79
+ header("Location: ".$product->getProductUrl()."");
80
+ die();
81
+ }
82
+
83
+ if($product->getName()=== NULL){
84
+ die('No Product with this id !');
85
+ }
86
+
87
+ echo '
88
+ <!DOCTYPE html>
89
+ <head>
90
+ <meta class="type" property="og:type" content="shopgo_store:store_item" />
91
+ <meta class="url" property="og:url" content="'.Mage::helper('core/url')->getCurrentUrl().'" />
92
+ <meta class="title" property="og:title" content="'.$product->getName().'" />
93
+ <meta class="image" property="og:image" content="'.$product->getImageUrl().'" />
94
+ <meta class="description" property="og:description" content="'.$product->getData('description').'" />
95
+
96
+ </head>
97
+ <body>
98
+ </body>
99
+ </html>
100
+ ';
101
+
102
+
103
+
104
+ }
105
+ }
app/code/local/Shopgo/FacebookStore/etc/adminhtml.xml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <menu>
4
+ <shopgo translate="title" module="facebookstore">
5
+ <title>Shopgo</title>
6
+ <sort_order>100</sort_order>
7
+ <children>
8
+ <facebookstore translate="title" module="facebookstore">
9
+ <title>Facebookstore2</title>
10
+ <sort_order>0</sort_order>
11
+ <children>
12
+ <configuration>
13
+ <title>About</title>
14
+ <sort_order>1</sort_order>
15
+ <action>adminhtml/system_config/edit/section/facebookstore</action>
16
+ </configuration>
17
+ </children>
18
+ </facebookstore>
19
+ </children>
20
+ </shopgo>
21
+ </menu>
22
+ <acl>
23
+ <resources>
24
+ <all>
25
+ <title>Allow Everything</title>
26
+ </all>
27
+ <admin>
28
+ <children>
29
+ <system>
30
+ <children>
31
+ <config>
32
+ <children>
33
+ <facebookstore translate="title">
34
+ <title>Facebookstore2 Module</title>
35
+ <sort_order>10</sort_order>
36
+ </facebookstore>
37
+ </children>
38
+ </config>
39
+ </children>
40
+ </system>
41
+ <shopgo translate="title" module="facebookstore">
42
+ <title>Shopgo</title>
43
+ <sort_order>71</sort_order>
44
+ <children>
45
+ <facebookstore translate="title">
46
+ <title>Facebookstore2 Module</title>
47
+ <children>
48
+ <configuration translate="title">
49
+ <title>Configuration</title>
50
+ <sort_order>1</sort_order>
51
+ </configuration>
52
+ </children>
53
+ </facebookstore>
54
+ </children>
55
+ </shopgo>
56
+ </children>
57
+ </admin>
58
+ </resources>
59
+ </acl>
60
+ </config>
app/code/local/Shopgo/FacebookStore/etc/config.xml ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!--
3
+ /**
4
+ * @category ShopGo
5
+ * @package ShopGo_FacebookStore
6
+ * @author ali@shopgo.me
7
+ */
8
+ -->
9
+ <config>
10
+ <modules>
11
+ <Shopgo_FacebookStore>
12
+ <version>2.0.2</version>
13
+ </Shopgo_FacebookStore>
14
+ </modules>
15
+ <global>
16
+ <models>
17
+ <facebookstore>
18
+ <class>Shopgo_FacebookStore_Model</class>
19
+ </facebookstore>
20
+ <catalog>
21
+ <rewrite>
22
+ <product_api>Shopgo_FacebookStore_Model_Product_Api</product_api>
23
+ <category_api>Shopgo_FacebookStore_Model_Category_Api</category_api>
24
+ </rewrite>
25
+ </catalog>
26
+ </models>
27
+ <blocks>
28
+ <facebookstore>
29
+ <class>Shopgo_FacebookStore_Block</class>
30
+ </facebookstore>
31
+ </blocks>
32
+ <helpers>
33
+ <facebookstore>
34
+ <class>Shopgo_FacebookStore_Helper</class>
35
+ </facebookstore>
36
+ </helpers>
37
+ <resources>
38
+ <facebookstore_setup>
39
+ <setup>
40
+ <module>Shopgo_FacebookStore</module>
41
+ </setup>
42
+ </facebookstore_setup>
43
+ </resources>
44
+ </global>
45
+ <frontend>
46
+ <routers>
47
+ <facebookstore>
48
+ <use>standard</use>
49
+ <args>
50
+ <module>Shopgo_FacebookStore</module>
51
+ <frontName>facebookstore</frontName>
52
+ </args>
53
+ </facebookstore>
54
+ </routers>
55
+ <layout>
56
+ <updates>
57
+ <facebookstore>
58
+ <file>shopgo/facebookstore.xml</file>
59
+ </facebookstore>
60
+ </updates>
61
+ </layout>
62
+ </frontend>
63
+ <default>
64
+ <facebookstore>
65
+ <general>
66
+ </general>
67
+ </facebookstore>
68
+ </default>
69
+ </config>
app/code/local/Shopgo/FacebookStore/etc/system.xml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <config>
2
+ <tabs>
3
+ <shopgo translate="label">
4
+ <label>Shopgo Extensions</label>
5
+ <sort_order>205</sort_order>
6
+ </shopgo>
7
+ </tabs>
8
+ <sections>
9
+ <facebookstore translate="label" module="facebookstore">
10
+ <class>separator-top</class>
11
+ <label>Shopgo Facebookstore2</label>
12
+ <tab>shopgo</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>300</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
+ <general translate="label">
20
+ <label>General information</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>1</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
+ <version translate="label">
28
+ <label>Facebook store version</label>
29
+ <frontend_type>select</frontend_type>
30
+ <frontend_model>Shopgo_FacebookStore_Block_Adminhtml_Version</frontend_model>
31
+ <sort_order>10</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>1</show_in_store>
35
+ </version>
36
+ </fields>
37
+ </general>
38
+ </groups>
39
+ </facebookstore>
40
+ </sections>
41
+ </config>
app/code/local/Shopgo/FacebookStore/sql/facebookstore_setup/mysql4-install-2.0.1.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * API user setup script
4
+ *
5
+ * @category Shopgo
6
+ * @package Shopgo_FacebookStore
7
+ */
8
+
9
+ $role = Mage::getModel('api/roles')
10
+ ->setName('Shopgo')
11
+ ->setRoleType('G')
12
+ ->save();
13
+
14
+ Mage::getModel("api/rules")
15
+ ->setRoleId($role->getId())
16
+ ->setResources(array('all'))
17
+ ->saveRel();
18
+
19
+
20
+ $data = array(
21
+ 'username' => 'shopgo_facebookstore',
22
+ 'firstname' => 'shopgo_facebookstore',
23
+ 'lastname' => 'shopgo_facebookstore',
24
+ 'email' => 'support@shopgo.me',
25
+ 'api_key' => 'JG0kDQ569Ls26by',
26
+ 'api_key_confirmation' => 'JG0kDQ569Ls26by',
27
+ 'is_active' => '1',
28
+ );
29
+ $user = Mage::getModel('api/user')->setData($data)
30
+ ->save();
31
+
32
+ $user->setRoleIds(array($role->getId()))
33
+ ->setRoleUserId($user->getUserId())
34
+ ->saveRelations();
app/etc/modules/Shopgo_FacebookStore.xml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!--
3
+ /**
4
+ * @category Shopgo
5
+ * @package Shopgo_FacebookStore
6
+ * @author ali@shopgo.me
7
+ */
8
+ -->
9
+ <config>
10
+ <modules>
11
+ <Shopgo_FacebookStore>
12
+ <active>true</active>
13
+ <codePool>local</codePool>
14
+ <depends>
15
+ <Mage_Core />
16
+ <Mage_Catalog />
17
+ </depends>
18
+ </Shopgo_FacebookStore>
19
+ </modules>
20
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Facebookstore2</name>
4
+ <version>2.0.2</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/MIT">MIT</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>ShopGo FacebookStore2</summary>
10
+ <description>ShopGo Facebook store Magento module to sync catalog data with the application.</description>
11
+ <notes>FacebookStore version 2.0.2</notes>
12
+ <authors><author><name>Ali Halabyah</name><user>alihalabyah</user><email>ali@shopgo.me</email></author><author><name>ShopGo</name><user>shopgo</user><email>support@shopgo.me</email></author></authors>
13
+ <date>2015-01-16</date>
14
+ <time>19:36:32</time>
15
+ <contents><target name="magelocal"><dir name="Shopgo"><dir name="FacebookStore"><dir name="Block"><dir name="Adminhtml"><file name="Version.php" hash="5d45a46004b7b89a51daa405b06e1f6d"/></dir></dir><dir name="Helper"><file name="Data.php" hash="7af4fe501d57fe60c1ada3fa56b50ff6"/></dir><dir name="Model"><dir name="Category"><file name="Api.php" hash="b8ce09cad9cded03dc01a996c6448c7c"/></dir><dir name="Product"><file name="Api.php" hash="0e6c3dfba4ae300fa1b20c7d231bc615"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="fb3ab939afb40fda6cc825a6409f4eb4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="91ef226efdbaa62a01b7f7f89c88ff85"/><file name="config.xml" hash="a35adb0aa15afd7b7db45c44a4071bd0"/><file name="system.xml" hash="4df51c5bcbcc090955680b2ab9204e47"/></dir><dir name="sql"><dir name="facebookstore_setup"><file name="mysql4-install-2.0.1.php" hash="e0286f6318cdc76b1383e465166bd43e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Shopgo_FacebookStore.xml" hash="748a6208e76ed323e9fa8981cdcac38d"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>