Version Notes
Its stable version for 1.7, 1.8 & 1.9.
Download this release
Release Info
Developer | Netsol |
Extension | Netsol_Social_Discount |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- app/code/community/Netsol/SocialDiscount/Block/Adminhtml/Analyticreport.php +12 -0
- app/code/community/Netsol/SocialDiscount/Block/Adminhtml/Report/Analytic/Grid.php +48 -0
- app/code/community/Netsol/SocialDiscount/Block/Adminhtml/Report/Grid.php +56 -3
- app/code/community/Netsol/SocialDiscount/Helper/Data.php +34 -10
- app/code/community/Netsol/SocialDiscount/Model/Mysql4/Analyticreport/Collection.php +44 -0
- app/code/community/Netsol/SocialDiscount/Model/Socialdiscount.php +1 -0
- app/code/community/Netsol/SocialDiscount/Model/System/Config/Source/Couponpermission.php +31 -0
- app/code/community/Netsol/SocialDiscount/controllers/Adminhtml/SocialdiscountController.php +71 -2
- app/code/community/Netsol/SocialDiscount/controllers/CouponController.php +33 -6
- app/code/community/Netsol/SocialDiscount/data/netsol_sd_setup/data-install-1.0.0.php +16 -0
- app/code/community/Netsol/SocialDiscount/etc/adminhtml.xml +22 -8
- app/code/community/Netsol/SocialDiscount/etc/config.xml +39 -1
- app/code/community/Netsol/SocialDiscount/etc/system.xml +66 -17
- app/code/community/Netsol/SocialDiscount/sql/netsol_sd_mysql4/mysql-install-1.0.php +0 -25
- app/code/community/Netsol/SocialDiscount/sql/{netsol_sd_mysql4/mysql-install-1.0.0.php → netsol_sd_setup/mysql4-install-1.0.1.php} +27 -1
- app/code/community/Netsol/SocialDiscount/sql/netsol_sd_setup/mysql4-upgrade-1.0.0-1.0.1.php +3 -0
- app/design/frontend/base/default/layout/netsol_sd.xml +9 -1
- app/design/frontend/base/default/template/netsol/social_discount/buttons.phtml +105 -69
- app/locale/en_US/template/email/sd_send_coupon_email.html +34 -0
- package.xml +8 -13
- skin/frontend/base/default/css/netsol/brand/brand.css +100 -0
- skin/frontend/base/default/css/netsol/brand/jquery.bxslider.css +206 -0
- skin/frontend/base/default/css/netsol/brand/tinycarousel.css +71 -0
- skin/frontend/base/default/css/netsol/social_discount.css +10 -18
- skin/frontend/base/default/images/netsol/brand/bullet.png +0 -0
- skin/frontend/base/default/images/netsol/brand/bx_loader.gif +0 -0
- skin/frontend/base/default/images/netsol/brand/controls.png +0 -0
- skin/frontend/base/default/images/netsol/brand/loading.gif +0 -0
- skin/frontend/base/default/images/netsol/brand/product_loader.gif +0 -0
- skin/frontend/base/default/images/netsol/brand/small_image.jpg +0 -0
app/code/community/Netsol/SocialDiscount/Block/Adminhtml/Analyticreport.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Netsol_SocialDiscount_Block_Adminhtml_Analyticreport extends Mage_Adminhtml_Block_Widget_Grid_Container
|
3 |
+
{
|
4 |
+
public function __construct() {
|
5 |
+
$this->_blockGroup = 'netsol_sd';
|
6 |
+
$this->_controller = 'adminhtml_report_analytic';
|
7 |
+
$this->_headerText = Mage::helper('netsol_sd')->__('Social Discount Analytics');
|
8 |
+
|
9 |
+
parent::__construct();
|
10 |
+
$this->_removeButton('add');
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Netsol/SocialDiscount/Block/Adminhtml/Report/Analytic/Grid.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Netsol_SocialDiscount_Block_Adminhtml_Report_Analytic_Grid extends Mage_Adminhtml_Block_Report_Grid
|
3 |
+
{
|
4 |
+
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('sd_analytic_report');
|
9 |
+
}
|
10 |
+
|
11 |
+
protected function _prepareCollection()
|
12 |
+
{
|
13 |
+
parent::_prepareCollection();
|
14 |
+
$this->getCollection()->initReport('netsol_sd/analyticreport_collection');
|
15 |
+
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _prepareColumns() {
|
19 |
+
$this->addColumn('product_name', array(
|
20 |
+
'header' => Mage::helper('reports')->__('Product Name'),
|
21 |
+
'index' => 'product_name',
|
22 |
+
'sortable' => false,
|
23 |
+
'totals_label' => Mage::helper('adminhtml')->__('Total'),
|
24 |
+
));
|
25 |
+
$this->addColumn('total_unique_ip', array(
|
26 |
+
'header' => Mage::helper('reports')->__("Unique IP's"),
|
27 |
+
'index' => 'total_unique_ip',
|
28 |
+
'sortable' => false,
|
29 |
+
));
|
30 |
+
$this->addColumn('total_coupon_code', array(
|
31 |
+
'header' => Mage::helper('reports')->__('Total Coupons'),
|
32 |
+
'index' => 'total_coupon_code',
|
33 |
+
'sortable' => false,
|
34 |
+
'total' => 'sum',
|
35 |
+
));
|
36 |
+
$this->addColumn('total_used_coupon', array(
|
37 |
+
'header' => Mage::helper('reports')->__('Used Coupon'),
|
38 |
+
'index' => 'total_used_coupon',
|
39 |
+
'sortable' => false,
|
40 |
+
'total' => 'sum',
|
41 |
+
));
|
42 |
+
|
43 |
+
$this->addExportType('*/*/exportSimpleCsv', Mage::helper('reports')->__('CSV'));
|
44 |
+
|
45 |
+
return parent::_prepareColumns();
|
46 |
+
}
|
47 |
+
|
48 |
+
}
|
app/code/community/Netsol/SocialDiscount/Block/Adminhtml/Report/Grid.php
CHANGED
@@ -7,7 +7,7 @@ class Netsol_SocialDiscount_Block_Adminhtml_Report_Grid extends Mage_Adminhtml_B
|
|
7 |
$this->setDefaultSort('id');
|
8 |
$this->setDefaultDir('DESC');
|
9 |
$this->setSaveParametersInSession(true);
|
10 |
-
|
11 |
}
|
12 |
|
13 |
protected function _prepareCollection() {
|
@@ -36,7 +36,8 @@ class Netsol_SocialDiscount_Block_Adminhtml_Report_Grid extends Mage_Adminhtml_B
|
|
36 |
));
|
37 |
$this->addColumn('product_name', array(
|
38 |
'header' => $helper->__('Product'),
|
39 |
-
'index' => 'product_name'
|
|
|
40 |
));
|
41 |
$this->addColumn('media', array(
|
42 |
'header' => $helper->__('Social Media'),
|
@@ -44,12 +45,19 @@ class Netsol_SocialDiscount_Block_Adminhtml_Report_Grid extends Mage_Adminhtml_B
|
|
44 |
'type' => 'options',
|
45 |
'options'=> array(
|
46 |
'Facebook' => 'Facebook',
|
47 |
-
'Twitter' => 'Twitter'
|
48 |
)
|
49 |
));
|
50 |
$this->addColumn('ip_address', array(
|
51 |
'header' => $helper->__('User IP'),
|
52 |
'index' => 'ip_address'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
));
|
54 |
$this->addColumn('coupon_code', array(
|
55 |
'header' => $helper->__('Coupon Code'),
|
@@ -80,8 +88,53 @@ class Netsol_SocialDiscount_Block_Adminhtml_Report_Grid extends Mage_Adminhtml_B
|
|
80 |
|
81 |
return parent::_prepareColumns();
|
82 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
public function getGridUrl() {
|
85 |
return false;
|
86 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
}
|
7 |
$this->setDefaultSort('id');
|
8 |
$this->setDefaultDir('DESC');
|
9 |
$this->setSaveParametersInSession(true);
|
10 |
+
//$this->setUseAjax(true);
|
11 |
}
|
12 |
|
13 |
protected function _prepareCollection() {
|
36 |
));
|
37 |
$this->addColumn('product_name', array(
|
38 |
'header' => $helper->__('Product'),
|
39 |
+
'index' => 'product_name',
|
40 |
+
'filter_condition_callback' => array($this, 'filterByProductCallback')
|
41 |
));
|
42 |
$this->addColumn('media', array(
|
43 |
'header' => $helper->__('Social Media'),
|
45 |
'type' => 'options',
|
46 |
'options'=> array(
|
47 |
'Facebook' => 'Facebook',
|
48 |
+
//'Twitter' => 'Twitter'
|
49 |
)
|
50 |
));
|
51 |
$this->addColumn('ip_address', array(
|
52 |
'header' => $helper->__('User IP'),
|
53 |
'index' => 'ip_address'
|
54 |
+
));
|
55 |
+
$this->addColumn('ip_status', array(
|
56 |
+
'header' => $helper->__('IP Status'),
|
57 |
+
'index' => 'ip_status',
|
58 |
+
'filter' => false,
|
59 |
+
'sortable' => false,
|
60 |
+
'frame_callback' => array($this, 'ipStatusFrameCallback')
|
61 |
));
|
62 |
$this->addColumn('coupon_code', array(
|
63 |
'header' => $helper->__('Coupon Code'),
|
88 |
|
89 |
return parent::_prepareColumns();
|
90 |
}
|
91 |
+
|
92 |
+
protected function _prepareMassaction() {
|
93 |
+
$this->setMassactionIdField('id');
|
94 |
+
$this->getMassactionBlock()->setFormFieldName('sd_id');
|
95 |
+
|
96 |
+
$this->getMassactionBlock()->addItem('sd_block_ip', array(
|
97 |
+
'label' => Mage::helper('tax')->__("Block IP's"),
|
98 |
+
'url' => $this->getUrl('*/*/massBlockIPs', array('' => '')),
|
99 |
+
'confirm' => Mage::helper('netsol_sd')->__('Are you sure?')
|
100 |
+
));
|
101 |
+
$this->getMassactionBlock()->addItem('sd_unblock_ip', array(
|
102 |
+
'label' => Mage::helper('tax')->__("Unblock IP's"),
|
103 |
+
'url' => $this->getUrl('*/*/massUnblockIPs', array('' => '')),
|
104 |
+
'confirm' => Mage::helper('netsol_sd')->__('Are you sure?')
|
105 |
+
));
|
106 |
+
|
107 |
+
return $this;
|
108 |
+
}
|
109 |
|
110 |
public function getGridUrl() {
|
111 |
return false;
|
112 |
}
|
113 |
+
|
114 |
+
public function ipStatusFrameCallback($value, $row, $column, $isExport) {
|
115 |
+
$blockedIps = Mage::getStoreConfig('netsol_sd/sd_coupons/sd_block_ip');
|
116 |
+
$blockedIps = explode(',', $blockedIps);
|
117 |
+
$html = 'Open';
|
118 |
+
|
119 |
+
if(in_array($row->getIpAddress(), $blockedIps))
|
120 |
+
$html = 'Blocked';
|
121 |
+
|
122 |
+
return $html;
|
123 |
+
}
|
124 |
+
|
125 |
+
public function filterByProductCallback($collection, $column) {
|
126 |
+
$value = $column->getFilter()->getValue();
|
127 |
+
if($value == null)
|
128 |
+
return;
|
129 |
+
|
130 |
+
$productCollection = Mage::getModel('catalog/product')
|
131 |
+
->getCollection()
|
132 |
+
->addAttributeToFilter('name', array('like' => '%'.$value.'%'));
|
133 |
+
$productCollection->getSelect()->reset(Zend_Db_Select::COLUMNS);
|
134 |
+
$productCollection->getSelect()->columns('entity_id');
|
135 |
+
$productCollection->getSelect()->distinct(true);
|
136 |
+
|
137 |
+
$productIds = $productCollection->getColumnValues('entity_id');
|
138 |
+
$collection->addFieldToFilter('product_id', array('in' => $productIds));
|
139 |
+
}
|
140 |
}
|
app/code/community/Netsol/SocialDiscount/Helper/Data.php
CHANGED
@@ -6,7 +6,8 @@ class Netsol_SocialDiscount_Helper_Data extends Mage_Core_Helper_Abstract
|
|
6 |
}
|
7 |
|
8 |
public function isTwitterEnabled() {
|
9 |
-
return
|
|
|
10 |
}
|
11 |
|
12 |
public function getFacebookAppId() {
|
@@ -17,6 +18,14 @@ class Netsol_SocialDiscount_Helper_Data extends Mage_Core_Helper_Abstract
|
|
17 |
return Mage::getStoreConfig('netsol_sd/sd_coupons/coupon_delete');
|
18 |
}
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
public function addCoupon($sku = null) {
|
21 |
$couponCode = Mage::helper('core')->getRandomString(Mage::getStoreConfig('netsol_sd/sd_coupons/coupon_length'));
|
22 |
$customerGroupIds = Mage::getModel('customer/group')->getCollection()->getAllIds();
|
@@ -40,7 +49,7 @@ class Netsol_SocialDiscount_Helper_Data extends Mage_Core_Helper_Abstract
|
|
40 |
->setSortOrder(0)
|
41 |
->setSimpleAction(Mage::getStoreConfig('netsol_sd/sd_coupons/coupon_discount_type'))
|
42 |
->setDiscountAmount(Mage::getStoreConfig('netsol_sd/sd_coupons/coupon_amount'))
|
43 |
-
->setDiscountQty(
|
44 |
->setDiscountStep(0)
|
45 |
->setSimpleFreeShipping('0')
|
46 |
->setApplyToShipping('0')
|
@@ -57,16 +66,31 @@ class Netsol_SocialDiscount_Helper_Data extends Mage_Core_Helper_Abstract
|
|
57 |
|
58 |
$rule->getConditions()->addCondition($productFoundCondition);
|
59 |
|
60 |
-
//set
|
61 |
-
$
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
//apply the rule discount to this specific product
|
68 |
-
|
69 |
-
|
|
|
|
|
70 |
|
71 |
try {
|
72 |
$rule->save();
|
6 |
}
|
7 |
|
8 |
public function isTwitterEnabled() {
|
9 |
+
return false;
|
10 |
+
//return Mage::getStoreConfig('netsol_sd/sd_twitter/twitter_share');
|
11 |
}
|
12 |
|
13 |
public function getFacebookAppId() {
|
18 |
return Mage::getStoreConfig('netsol_sd/sd_coupons/coupon_delete');
|
19 |
}
|
20 |
|
21 |
+
public function isValidIP() {
|
22 |
+
$customerIp = $_SERVER['REMOTE_ADDR'];
|
23 |
+
$blockedIps = Mage::getStoreConfig('netsol_sd/sd_coupons/sd_block_ip');
|
24 |
+
$blockedIps = array_map('trim', explode(',', $blockedIps));
|
25 |
+
|
26 |
+
return (!in_array($customerIp, $blockedIps)) ? true : false;
|
27 |
+
}
|
28 |
+
|
29 |
public function addCoupon($sku = null) {
|
30 |
$couponCode = Mage::helper('core')->getRandomString(Mage::getStoreConfig('netsol_sd/sd_coupons/coupon_length'));
|
31 |
$customerGroupIds = Mage::getModel('customer/group')->getCollection()->getAllIds();
|
49 |
->setSortOrder(0)
|
50 |
->setSimpleAction(Mage::getStoreConfig('netsol_sd/sd_coupons/coupon_discount_type'))
|
51 |
->setDiscountAmount(Mage::getStoreConfig('netsol_sd/sd_coupons/coupon_amount'))
|
52 |
+
->setDiscountQty(0)
|
53 |
->setDiscountStep(0)
|
54 |
->setSimpleFreeShipping('0')
|
55 |
->setApplyToShipping('0')
|
66 |
|
67 |
$rule->getConditions()->addCondition($productFoundCondition);
|
68 |
|
69 |
+
//set coupon condition
|
70 |
+
$useOfCoupon = Mage::getStoreConfig('netsol_sd/sd_coupons/use_of_coupon');
|
71 |
+
if($useOfCoupon == 'same_product') {
|
72 |
+
$attributeSetCondition = Mage::getModel('salesrule/rule_condition_product')
|
73 |
+
->setType('salesrule/rule_condition_product')
|
74 |
+
->setAttribute('sku')
|
75 |
+
->setOperator('==')
|
76 |
+
->setValue($sku);
|
77 |
+
} else if($useOfCoupon == 'product_category') {
|
78 |
+
$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);
|
79 |
+
$categoryIds = $product->getCategoryIds();
|
80 |
+
if(!empty($categoryIds)) {
|
81 |
+
$attributeSetCondition = Mage::getModel('salesrule/rule_condition_product')
|
82 |
+
->setType('salesrule/rule_condition_product')
|
83 |
+
->setAttribute('category_ids')
|
84 |
+
->setOperator('()')
|
85 |
+
->setValue(implode(',', $categoryIds));
|
86 |
+
}
|
87 |
+
}
|
88 |
|
89 |
//apply the rule discount to this specific product
|
90 |
+
if(isset($attributeSetCondition)) {
|
91 |
+
$productFoundCondition->addCondition($attributeSetCondition);
|
92 |
+
$rule->getActions()->addCondition($attributeSetCondition);
|
93 |
+
}
|
94 |
|
95 |
try {
|
96 |
$rule->save();
|
app/code/community/Netsol/SocialDiscount/Model/Mysql4/Analyticreport/Collection.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Netsol_SocialDiscount_Model_Mysql4_Analyticreport_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
3 |
+
{
|
4 |
+
|
5 |
+
protected function _construct() {
|
6 |
+
$this->_init('netsol_sd/socialdiscount');
|
7 |
+
}
|
8 |
+
|
9 |
+
protected function _joinFields($from = '', $to = '') {
|
10 |
+
$productNameAttrId = Mage::getModel('eav/entity_attribute')->loadByCode('4', 'name')->getAttributeId();
|
11 |
+
|
12 |
+
$this->addFieldToFilter('creation_date' , array("from" => $from, "to" => $to, "datetime" => true));
|
13 |
+
$this->getSelect()
|
14 |
+
->group('product_id')
|
15 |
+
->columns(array('total_coupon_code' => 'COUNT(coupon_code)'))
|
16 |
+
->columns(array('total_unique_ip' => 'COUNT(DISTINCT(ip_address))'))
|
17 |
+
->columns(array('total_used_coupon' => 'SUM(IF(coupon_used = "1", 1, 0))'))
|
18 |
+
->joinLeft(
|
19 |
+
array('cpev' => 'catalog_product_entity_varchar'),
|
20 |
+
'cpev.entity_id = main_table.product_id AND cpev.attribute_id = '.$productNameAttrId,
|
21 |
+
array('product_name' => 'value')
|
22 |
+
);
|
23 |
+
|
24 |
+
return $this;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function setDateRange($from, $to) {
|
28 |
+
$this->_reset()->_joinFields($from, $to);
|
29 |
+
return $this;
|
30 |
+
}
|
31 |
+
|
32 |
+
public function load($printQuery = false, $logQuery = false) {
|
33 |
+
if ($this->isLoaded()) {
|
34 |
+
return $this;
|
35 |
+
}
|
36 |
+
|
37 |
+
parent::load($printQuery, $logQuery);
|
38 |
+
return $this;
|
39 |
+
}
|
40 |
+
|
41 |
+
public function setStoreIds($storeIds) {
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
}
|
app/code/community/Netsol/SocialDiscount/Model/Socialdiscount.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
class Netsol_SocialDiscount_Model_Socialdiscount extends Mage_Core_Model_Abstract
|
3 |
{
|
4 |
protected function _construct() {
|
|
|
5 |
$this->_init('netsol_sd/socialdiscount');
|
6 |
}
|
7 |
}
|
2 |
class Netsol_SocialDiscount_Model_Socialdiscount extends Mage_Core_Model_Abstract
|
3 |
{
|
4 |
protected function _construct() {
|
5 |
+
parent::_construct();
|
6 |
$this->_init('netsol_sd/socialdiscount');
|
7 |
}
|
8 |
}
|
app/code/community/Netsol/SocialDiscount/Model/System/Config/Source/Couponpermission.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Netsol_SocialDiscount_Model_System_Config_Source_Couponpermission
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Options getter
|
6 |
+
*
|
7 |
+
* @return array
|
8 |
+
*/
|
9 |
+
public function toOptionArray()
|
10 |
+
{
|
11 |
+
return array(
|
12 |
+
array('value' => 'same_product', 'label'=>Mage::helper('adminhtml')->__('Only on same product')),
|
13 |
+
array('value' => 'product_category', 'label'=>Mage::helper('adminhtml')->__('All products from same category')),
|
14 |
+
array('value' => 'all_products', 'label'=>Mage::helper('adminhtml')->__('All products')),
|
15 |
+
);
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Get options in "key-value" format
|
20 |
+
*
|
21 |
+
* @return array
|
22 |
+
*/
|
23 |
+
public function toArray()
|
24 |
+
{
|
25 |
+
return array(
|
26 |
+
'same_product' => Mage::helper('adminhtml')->__('Only on same product'),
|
27 |
+
'product_category' => Mage::helper('adminhtml')->__('All products from same category'),
|
28 |
+
'all_products' => Mage::helper('adminhtml')->__('All products'),
|
29 |
+
);
|
30 |
+
}
|
31 |
+
}
|
app/code/community/Netsol/SocialDiscount/controllers/Adminhtml/SocialdiscountController.php
CHANGED
@@ -8,11 +8,80 @@ class Netsol_SocialDiscount_Adminhtml_SocialdiscountController extends Mage_Admi
|
|
8 |
return $this;
|
9 |
}
|
10 |
|
11 |
-
|
|
|
|
|
|
|
12 |
$this->_initAction();
|
13 |
$this->_title($this->__('Social Discount'));
|
14 |
-
$this->_setActiveMenu('
|
15 |
$this->_addContent($this->getLayout()->createBlock('netsol_sd/adminhtml_report'));
|
16 |
$this->renderLayout();
|
17 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
8 |
return $this;
|
9 |
}
|
10 |
|
11 |
+
/*
|
12 |
+
*@ Description: Show social discount coupons listing
|
13 |
+
*/
|
14 |
+
public function listAction() {
|
15 |
$this->_initAction();
|
16 |
$this->_title($this->__('Social Discount'));
|
17 |
+
$this->_setActiveMenu('netsol_sd/social_discount');
|
18 |
$this->_addContent($this->getLayout()->createBlock('netsol_sd/adminhtml_report'));
|
19 |
$this->renderLayout();
|
20 |
}
|
21 |
+
|
22 |
+
|
23 |
+
/*
|
24 |
+
*@ Description: Mass block ip address
|
25 |
+
*@ Param: social_discount_id's
|
26 |
+
*/
|
27 |
+
public function massBlockIPsAction() {
|
28 |
+
$sdIds = $this->getRequest()->getParam('sd_id');
|
29 |
+
$sdCollection = Mage::getModel('netsol_sd/socialdiscount')
|
30 |
+
->getCollection()
|
31 |
+
->addFieldToFilter('id', array('in' => $sdIds));
|
32 |
+
|
33 |
+
$this->updateIpAddresses($sdCollection, true);
|
34 |
+
}
|
35 |
+
|
36 |
+
/*
|
37 |
+
*@ Description: Mass un-block ip address
|
38 |
+
*@ Param: social_discount_id's
|
39 |
+
*/
|
40 |
+
public function massUnblockIPsAction() {
|
41 |
+
$sdIds = $this->getRequest()->getParam('sd_id');
|
42 |
+
$sdCollection = Mage::getModel('netsol_sd/socialdiscount')
|
43 |
+
->getCollection()
|
44 |
+
->addFieldToFilter('id', array('in' => $sdIds));
|
45 |
+
|
46 |
+
$this->updateIpAddresses($sdCollection, false);
|
47 |
+
}
|
48 |
+
|
49 |
+
/*
|
50 |
+
*@ Description: Process multiple ip address to block or un-block
|
51 |
+
*@ Param: social discount collection
|
52 |
+
*@ Param2: block or un-block (bolean)
|
53 |
+
*/
|
54 |
+
public function updateIpAddresses($collection, $block = true) {
|
55 |
+
if($collection->count() > 0) {
|
56 |
+
$blockedIps = Mage::getStoreConfig('netsol_sd/sd_coupons/sd_block_ip');
|
57 |
+
$blockedIps = explode(',', $blockedIps);
|
58 |
+
|
59 |
+
if($block) {
|
60 |
+
foreach($collection as $sd)
|
61 |
+
$blockedIps[] = $sd->getIpAddress();
|
62 |
+
} else {
|
63 |
+
foreach($collection as $sd)
|
64 |
+
unset($blockedIps[array_search($sd->getIpAddress(), $blockedIps)]);
|
65 |
+
}
|
66 |
+
|
67 |
+
$blockedIps = array_unique(array_filter($blockedIps));
|
68 |
+
try {
|
69 |
+
$configModel = Mage::getModel('core/config')->saveConfig('netsol_sd/sd_coupons/sd_block_ip', implode(',', $blockedIps));
|
70 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Ip addresses have been updated successfully.'));
|
71 |
+
} catch(Exception $e) {
|
72 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
$this->_redirect('*/*/list');
|
77 |
+
}
|
78 |
+
|
79 |
+
public function reportAction() {
|
80 |
+
$this->_initAction()
|
81 |
+
->_title($this->__('Social Discount'))
|
82 |
+
->_setActiveMenu('netsol_sd/sd_analytic_report')
|
83 |
+
->_addContent($this->getLayout()->createBlock('netsol_sd/adminhtml_analyticreport'));
|
84 |
+
|
85 |
+
$this->renderLayout();
|
86 |
+
}
|
87 |
}
|
app/code/community/Netsol/SocialDiscount/controllers/CouponController.php
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
<?php
|
2 |
class Netsol_SocialDiscount_CouponController extends Mage_Core_Controller_Front_Action
|
3 |
{
|
|
|
|
|
|
|
4 |
public function processAction() {
|
5 |
$feedId = $this->getRequest()->getPost('feedId');
|
6 |
$sku = $this->getRequest()->getPost('sku');
|
@@ -35,12 +38,36 @@ class Netsol_SocialDiscount_CouponController extends Mage_Core_Controller_Front_
|
|
35 |
$this->getResponse()->setBody(json_encode($response));
|
36 |
}
|
37 |
|
38 |
-
public function
|
39 |
-
$
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
|
|
|
|
|
|
45 |
}
|
46 |
}
|
1 |
<?php
|
2 |
class Netsol_SocialDiscount_CouponController extends Mage_Core_Controller_Front_Action
|
3 |
{
|
4 |
+
const XML_PATH_COUPON_EMAIL_TEMPLATE = 'netsol_sd/sd_coupons/coupon_email';
|
5 |
+
const XML_PATH_COUPON_EMAIL_IDENTITY = 'netsol_sd/sd_coupons/coupon_email_sender';
|
6 |
+
|
7 |
public function processAction() {
|
8 |
$feedId = $this->getRequest()->getPost('feedId');
|
9 |
$sku = $this->getRequest()->getPost('sku');
|
38 |
$this->getResponse()->setBody(json_encode($response));
|
39 |
}
|
40 |
|
41 |
+
public function sendCouponEmailAction() {
|
42 |
+
$data = $this->getRequest()->getPost();
|
43 |
+
$response = array('success' => false);
|
44 |
+
|
45 |
+
if($data['coupon_code'] != '') {
|
46 |
+
$emailVars = array('customer_name' => strtok($data['customer_email'], '@'), 'coupon_code' => $data['coupon_code']);
|
47 |
+
$translate = Mage::getSingleton('core/translate');
|
48 |
+
$translate->setTranslateInline(false);
|
49 |
+
$storeId = Mage::app()->getStore()->getId();
|
50 |
+
|
51 |
+
$mailTemplate = Mage::getModel('core/email_template');
|
52 |
+
try {
|
53 |
+
$mailTemplate->setDesignConfig(array('area'=>'frontend'))
|
54 |
+
->sendTransactional(
|
55 |
+
Mage::getStoreConfig(self::XML_PATH_COUPON_EMAIL_TEMPLATE),
|
56 |
+
Mage::getStoreConfig(self::XML_PATH_COUPON_EMAIL_IDENTITY),
|
57 |
+
$data['customer_email'],
|
58 |
+
strtok($data['customer_email'], '@'),
|
59 |
+
$emailVars,
|
60 |
+
$storeId
|
61 |
+
);
|
62 |
+
$translate->setTranslateInline(true);
|
63 |
+
} catch(Exception $e) {
|
64 |
+
echo $e->getMessage(); die;
|
65 |
+
}
|
66 |
+
|
67 |
+
$response['success'] = true;
|
68 |
}
|
69 |
+
|
70 |
+
$this->getResponse()->clearHeaders()->setHeader('Content-type','application/json',true);
|
71 |
+
$this->getResponse()->setBody(json_encode($response));
|
72 |
}
|
73 |
}
|
app/code/community/Netsol/SocialDiscount/data/netsol_sd_setup/data-install-1.0.0.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* @desc: Default enable social discount for all products on installation
|
4 |
+
*/
|
5 |
+
|
6 |
+
$products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('enable_social_discount');
|
7 |
+
if($products->count()) {
|
8 |
+
Mage::getSingleton('core/resource_iterator')->walk($products->getSelect(), array('socialDiscountCallback'));
|
9 |
+
}
|
10 |
+
|
11 |
+
function socialDiscountCallback($args) {
|
12 |
+
$product = Mage::getModel('catalog/product');
|
13 |
+
$product->setData($args['row']); //map data to product model
|
14 |
+
$product->setEnableSocialDiscount(1);
|
15 |
+
$product->getResource()->saveAttribute($product, 'enable_social_discount');
|
16 |
+
}
|
app/code/community/Netsol/SocialDiscount/etc/adminhtml.xml
CHANGED
@@ -1,15 +1,22 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
<menu>
|
4 |
-
<
|
|
|
|
|
5 |
<children>
|
6 |
<social_discount module="netsol_sd">
|
7 |
<title>Social Discount</title>
|
8 |
-
<sort_order>
|
9 |
-
<action>adminhtml/socialdiscount/
|
10 |
</social_discount>
|
|
|
|
|
|
|
|
|
|
|
11 |
</children>
|
12 |
-
</
|
13 |
</menu>
|
14 |
<acl>
|
15 |
<resources>
|
@@ -26,13 +33,20 @@
|
|
26 |
</config>
|
27 |
</children>
|
28 |
</system>
|
29 |
-
<
|
|
|
|
|
30 |
<children>
|
31 |
-
<social_discount
|
32 |
-
<title>Social Discount
|
|
|
33 |
</social_discount>
|
|
|
|
|
|
|
|
|
34 |
</children>
|
35 |
-
</
|
36 |
</children>
|
37 |
</admin>
|
38 |
</resources>
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
<menu>
|
4 |
+
<netsol_sd>
|
5 |
+
<title>Social Discount</title>
|
6 |
+
<sort_order>1000</sort_order>
|
7 |
<children>
|
8 |
<social_discount module="netsol_sd">
|
9 |
<title>Social Discount</title>
|
10 |
+
<sort_order>1</sort_order>
|
11 |
+
<action>adminhtml/socialdiscount/list</action>
|
12 |
</social_discount>
|
13 |
+
<sd_analytic_report module="netsol_sd">
|
14 |
+
<title>Analytic Report</title>
|
15 |
+
<sort_order>2</sort_order>
|
16 |
+
<action>adminhtml/socialdiscount/report</action>
|
17 |
+
</sd_analytic_report>
|
18 |
</children>
|
19 |
+
</netsol_sd>
|
20 |
</menu>
|
21 |
<acl>
|
22 |
<resources>
|
33 |
</config>
|
34 |
</children>
|
35 |
</system>
|
36 |
+
<netsol_sd>
|
37 |
+
<title>Social Discount</title>
|
38 |
+
<sort_order>1000</sort_order>
|
39 |
<children>
|
40 |
+
<social_discount module="netsol_sd">
|
41 |
+
<title>Social Discount</title>
|
42 |
+
<sort_order>1</sort_order>
|
43 |
</social_discount>
|
44 |
+
<sd_analytic_report module="netsol_sd">
|
45 |
+
<title>Analytic Report</title>
|
46 |
+
<sort_order>2</sort_order>
|
47 |
+
</sd_analytic_report>
|
48 |
</children>
|
49 |
+
</netsol_sd>
|
50 |
</children>
|
51 |
</admin>
|
52 |
</resources>
|
app/code/community/Netsol/SocialDiscount/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Netsol_SocialDiscount>
|
5 |
-
<version>1.0.
|
6 |
</Netsol_SocialDiscount>
|
7 |
</modules>
|
8 |
|
@@ -51,6 +51,16 @@
|
|
51 |
</connection>
|
52 |
</netsol_sd_read>
|
53 |
</resources>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
</global>
|
55 |
|
56 |
<frontend>
|
@@ -94,4 +104,32 @@
|
|
94 |
</adminhtml>
|
95 |
</routers>
|
96 |
</admin>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
</config>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Netsol_SocialDiscount>
|
5 |
+
<version>1.0.1</version>
|
6 |
</Netsol_SocialDiscount>
|
7 |
</modules>
|
8 |
|
51 |
</connection>
|
52 |
</netsol_sd_read>
|
53 |
</resources>
|
54 |
+
|
55 |
+
<template>
|
56 |
+
<email>
|
57 |
+
<netsol_sd_sd_coupons_coupon_email module="netsol_sd">
|
58 |
+
<label>Social Discount Send Coupon Email</label>
|
59 |
+
<file>sd_send_coupon_email.html</file>
|
60 |
+
<type>html</type>
|
61 |
+
</netsol_sd_sd_coupons_coupon_email>
|
62 |
+
</email>
|
63 |
+
</template>
|
64 |
</global>
|
65 |
|
66 |
<frontend>
|
104 |
</adminhtml>
|
105 |
</routers>
|
106 |
</admin>
|
107 |
+
|
108 |
+
<adminhtml>
|
109 |
+
<layout>
|
110 |
+
<updates>
|
111 |
+
<netsol_sd>
|
112 |
+
<file>netsol_sd.xml</file>
|
113 |
+
</netsol_sd>
|
114 |
+
</updates>
|
115 |
+
</layout>
|
116 |
+
</adminhtml>
|
117 |
+
|
118 |
+
<default>
|
119 |
+
<netsol_sd>
|
120 |
+
<sd_coupons>
|
121 |
+
<coupon_name>Social Discount Off</coupon_name>
|
122 |
+
<coupon_description>Social Discount Off</coupon_description>
|
123 |
+
<coupon_length>8</coupon_length>
|
124 |
+
<coupon_discount_type>by_percent</coupon_discount_type>
|
125 |
+
<coupon_amount>5</coupon_amount>
|
126 |
+
<coupon_delete>1</coupon_delete>
|
127 |
+
<coupon_email_sender>general</coupon_email_sender>
|
128 |
+
<coupon_email>netsol_sd_sd_coupons_coupon_email</coupon_email>
|
129 |
+
</sd_coupons>
|
130 |
+
<sd_facebook>
|
131 |
+
<facebook_share>0</facebook_share>
|
132 |
+
</sd_facebook>
|
133 |
+
</netsol_sd>
|
134 |
+
</default>
|
135 |
</config>
|
app/code/community/Netsol/SocialDiscount/etc/system.xml
CHANGED
@@ -33,7 +33,7 @@
|
|
33 |
<show_in_default>1</show_in_default>
|
34 |
<show_in_website>1</show_in_website>
|
35 |
<show_in_store>1</show_in_store>
|
36 |
-
<required
|
37 |
</coupon_name>
|
38 |
<coupon_description translate="label">
|
39 |
<label>Coupon Description</label>
|
@@ -52,7 +52,7 @@
|
|
52 |
<show_in_default>1</show_in_default>
|
53 |
<show_in_website>1</show_in_website>
|
54 |
<show_in_store>1</show_in_store>
|
55 |
-
<required
|
56 |
</coupon_length>
|
57 |
<coupon_discount_type translate="label">
|
58 |
<label>Discount Type</label>
|
@@ -72,18 +72,55 @@
|
|
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 |
-
<required
|
76 |
</coupon_amount>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
<coupon_delete translate="label">
|
78 |
<label>Delete Coupon After Use</label>
|
79 |
<comment>Recommened to delete used coupons, so those coupon codes can re-used.</comment>
|
80 |
<frontend_type>select</frontend_type>
|
81 |
-
<sort_order>
|
82 |
<show_in_default>1</show_in_default>
|
83 |
<show_in_website>1</show_in_website>
|
84 |
<show_in_store>1</show_in_store>
|
85 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
86 |
</coupon_delete>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
</fields>
|
88 |
</sd_coupons>
|
89 |
|
@@ -114,21 +151,15 @@
|
|
114 |
<show_in_default>1</show_in_default>
|
115 |
<show_in_website>1</show_in_website>
|
116 |
<show_in_store>1</show_in_store>
|
117 |
-
<required
|
|
|
|
|
|
|
118 |
</facebook_app_id>
|
119 |
-
<facebook_share_url translate="label">
|
120 |
-
<label>Default Share Url</label>
|
121 |
-
<comment>URL to share from homepage</comment>
|
122 |
-
<frontend_type>text</frontend_type>
|
123 |
-
<sort_order>3</sort_order>
|
124 |
-
<show_in_default>1</show_in_default>
|
125 |
-
<show_in_website>1</show_in_website>
|
126 |
-
<show_in_store>1</show_in_store>
|
127 |
-
</facebook_share_url>
|
128 |
</fields>
|
129 |
</sd_facebook>
|
130 |
|
131 |
-
|
132 |
<label>Twitter Settings</label>
|
133 |
<frontend_type>text</frontend_type>
|
134 |
<sort_order>300</sort_order>
|
@@ -155,7 +186,10 @@
|
|
155 |
<show_in_default>1</show_in_default>
|
156 |
<show_in_website>1</show_in_website>
|
157 |
<show_in_store>1</show_in_store>
|
158 |
-
<required
|
|
|
|
|
|
|
159 |
</twitter_access_token>
|
160 |
<twitter_access_token_secret translate="label">
|
161 |
<label>Twitter Access Token Secret</label>
|
@@ -165,6 +199,11 @@
|
|
165 |
<show_in_default>1</show_in_default>
|
166 |
<show_in_website>1</show_in_website>
|
167 |
<show_in_store>1</show_in_store>
|
|
|
|
|
|
|
|
|
|
|
168 |
</twitter_access_token_secret>
|
169 |
<twitter_consumer_key translate="label">
|
170 |
<label>Twitter Consumer Key</label>
|
@@ -174,6 +213,11 @@
|
|
174 |
<show_in_default>1</show_in_default>
|
175 |
<show_in_website>1</show_in_website>
|
176 |
<show_in_store>1</show_in_store>
|
|
|
|
|
|
|
|
|
|
|
177 |
</twitter_consumer_key>
|
178 |
<twitter_consumer_secret translate="label">
|
179 |
<label>Twitter Consumer Secret</label>
|
@@ -183,9 +227,14 @@
|
|
183 |
<show_in_default>1</show_in_default>
|
184 |
<show_in_website>1</show_in_website>
|
185 |
<show_in_store>1</show_in_store>
|
|
|
|
|
|
|
|
|
|
|
186 |
</twitter_consumer_secret>
|
187 |
</fields>
|
188 |
-
</sd_twitter
|
189 |
</groups>
|
190 |
</netsol_sd>
|
191 |
</sections>
|
33 |
<show_in_default>1</show_in_default>
|
34 |
<show_in_website>1</show_in_website>
|
35 |
<show_in_store>1</show_in_store>
|
36 |
+
<validate>required-entry</validate>
|
37 |
</coupon_name>
|
38 |
<coupon_description translate="label">
|
39 |
<label>Coupon Description</label>
|
52 |
<show_in_default>1</show_in_default>
|
53 |
<show_in_website>1</show_in_website>
|
54 |
<show_in_store>1</show_in_store>
|
55 |
+
<validate>required-entry validate-number</validate>
|
56 |
</coupon_length>
|
57 |
<coupon_discount_type translate="label">
|
58 |
<label>Discount Type</label>
|
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 |
+
<validate>required-entry validate-number</validate>
|
76 |
</coupon_amount>
|
77 |
+
<use_of_coupon translate="label">
|
78 |
+
<label>Use of Coupon</label>
|
79 |
+
<comment>Allow customer to use coupon on ?</comment>
|
80 |
+
<frontend_type>select</frontend_type>
|
81 |
+
<sort_order>6</sort_order>
|
82 |
+
<show_in_default>1</show_in_default>
|
83 |
+
<show_in_website>1</show_in_website>
|
84 |
+
<show_in_store>1</show_in_store>
|
85 |
+
<source_model>netsol_sd/system_config_source_couponpermission</source_model>
|
86 |
+
</use_of_coupon>
|
87 |
<coupon_delete translate="label">
|
88 |
<label>Delete Coupon After Use</label>
|
89 |
<comment>Recommened to delete used coupons, so those coupon codes can re-used.</comment>
|
90 |
<frontend_type>select</frontend_type>
|
91 |
+
<sort_order>7</sort_order>
|
92 |
<show_in_default>1</show_in_default>
|
93 |
<show_in_website>1</show_in_website>
|
94 |
<show_in_store>1</show_in_store>
|
95 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
96 |
</coupon_delete>
|
97 |
+
<sd_block_ip translate="label">
|
98 |
+
<label>Blacklist IP Address</label>
|
99 |
+
<comment>Add multiple IP addresses (, seprated) which you want to block. Those user's will not able to share products.</comment>
|
100 |
+
<frontend_type>textarea</frontend_type>
|
101 |
+
<sort_order>8</sort_order>
|
102 |
+
<show_in_default>1</show_in_default>
|
103 |
+
<show_in_website>1</show_in_website>
|
104 |
+
<show_in_store>1</show_in_store>
|
105 |
+
</sd_block_ip>
|
106 |
+
<coupon_email translate="label">
|
107 |
+
<label>Coupon Email Template</label>
|
108 |
+
<frontend_type>select</frontend_type>
|
109 |
+
<source_model>adminhtml/system_config_source_email_template</source_model>
|
110 |
+
<sort_order>9</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 |
+
</coupon_email>
|
115 |
+
<coupon_email_sender translate="label">
|
116 |
+
<label>Coupon Email Sender</label>
|
117 |
+
<frontend_type>select</frontend_type>
|
118 |
+
<source_model>adminhtml/system_config_source_email_identity</source_model>
|
119 |
+
<sort_order>10</sort_order>
|
120 |
+
<show_in_default>1</show_in_default>
|
121 |
+
<show_in_website>1</show_in_website>
|
122 |
+
<show_in_store>1</show_in_store>
|
123 |
+
</coupon_email_sender>
|
124 |
</fields>
|
125 |
</sd_coupons>
|
126 |
|
151 |
<show_in_default>1</show_in_default>
|
152 |
<show_in_website>1</show_in_website>
|
153 |
<show_in_store>1</show_in_store>
|
154 |
+
<validate>required-entry validate-number</validate>
|
155 |
+
<depends>
|
156 |
+
<facebook_share>1</facebook_share>
|
157 |
+
</depends>
|
158 |
</facebook_app_id>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
</fields>
|
160 |
</sd_facebook>
|
161 |
|
162 |
+
<!--sd_twitter translate="label" module="netsol_sd">
|
163 |
<label>Twitter Settings</label>
|
164 |
<frontend_type>text</frontend_type>
|
165 |
<sort_order>300</sort_order>
|
186 |
<show_in_default>1</show_in_default>
|
187 |
<show_in_website>1</show_in_website>
|
188 |
<show_in_store>1</show_in_store>
|
189 |
+
<validate>required-entry</validate>
|
190 |
+
<depends>
|
191 |
+
<twitter_share>1</twitter_share>
|
192 |
+
</depends>
|
193 |
</twitter_access_token>
|
194 |
<twitter_access_token_secret translate="label">
|
195 |
<label>Twitter Access Token Secret</label>
|
199 |
<show_in_default>1</show_in_default>
|
200 |
<show_in_website>1</show_in_website>
|
201 |
<show_in_store>1</show_in_store>
|
202 |
+
<show_in_store>1</show_in_store>
|
203 |
+
<validate>required-entry</validate>
|
204 |
+
<depends>
|
205 |
+
<twitter_share>1</twitter_share>
|
206 |
+
</depends>
|
207 |
</twitter_access_token_secret>
|
208 |
<twitter_consumer_key translate="label">
|
209 |
<label>Twitter Consumer Key</label>
|
213 |
<show_in_default>1</show_in_default>
|
214 |
<show_in_website>1</show_in_website>
|
215 |
<show_in_store>1</show_in_store>
|
216 |
+
<show_in_store>1</show_in_store>
|
217 |
+
<validate>required-entry</validate>
|
218 |
+
<depends>
|
219 |
+
<twitter_share>1</twitter_share>
|
220 |
+
</depends>
|
221 |
</twitter_consumer_key>
|
222 |
<twitter_consumer_secret translate="label">
|
223 |
<label>Twitter Consumer Secret</label>
|
227 |
<show_in_default>1</show_in_default>
|
228 |
<show_in_website>1</show_in_website>
|
229 |
<show_in_store>1</show_in_store>
|
230 |
+
<show_in_store>1</show_in_store>
|
231 |
+
<validate>required-entry</validate>
|
232 |
+
<depends>
|
233 |
+
<twitter_share>1</twitter_share>
|
234 |
+
</depends>
|
235 |
</twitter_consumer_secret>
|
236 |
</fields>
|
237 |
+
</sd_twitter-->
|
238 |
</groups>
|
239 |
</netsol_sd>
|
240 |
</sections>
|
app/code/community/Netsol/SocialDiscount/sql/netsol_sd_mysql4/mysql-install-1.0.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$installer = $this;
|
3 |
-
$installer->startSetup();
|
4 |
-
$installer->run(
|
5 |
-
"DROP TABLE IF EXISTS {$this->getTable('netsol_social_discount')};
|
6 |
-
|
7 |
-
CREATE TABLE IF NOT EXISTS {$this->getTable('netsol_social_discount')} (
|
8 |
-
`id` int(11) NOT NULL,
|
9 |
-
`product_id` int(11) NOT NULL,
|
10 |
-
`media` varchar(30) NOT NULL,
|
11 |
-
`ip_address` varchar(50) NOT NULL,
|
12 |
-
`coupon_code` varchar(30) NOT NULL,
|
13 |
-
`coupon_used` enum('1','0') NOT NULL DEFAULT '0',
|
14 |
-
`creation_date` datetime NOT NULL,
|
15 |
-
`coupon_used_date` datetime NOT NULL,
|
16 |
-
`magento_order_id` varchar(50) NOT NULL
|
17 |
-
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
18 |
-
|
19 |
-
ALTER TABLE {$this->getTable('netsol_social_discount')} ADD PRIMARY KEY (`id`);
|
20 |
-
|
21 |
-
ALTER TABLE {$this->getTable('netsol_social_discount')} MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
22 |
-
|
23 |
-
UPDATE `catalog_eav_attribute` SET `is_used_for_promo_rules` = 1 where `attribute_id` = (SELECT `attribute_id` FROM `eav_attribute` WHERE `attribute_code` = 'sku')"
|
24 |
-
);
|
25 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Netsol/SocialDiscount/sql/{netsol_sd_mysql4/mysql-install-1.0.0.php → netsol_sd_setup/mysql4-install-1.0.1.php}
RENAMED
@@ -20,6 +20,32 @@ $installer->run(
|
|
20 |
|
21 |
ALTER TABLE {$this->getTable('netsol_social_discount')} MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
22 |
|
23 |
-
UPDATE `catalog_eav_attribute` SET `is_used_for_promo_rules` = 1 where `attribute_id` = (SELECT `attribute_id` FROM `eav_attribute` WHERE `attribute_code` = 'sku')"
|
24 |
);
|
25 |
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
ALTER TABLE {$this->getTable('netsol_social_discount')} MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
22 |
|
23 |
+
UPDATE `catalog_eav_attribute` SET `is_used_for_promo_rules` = 1 where `attribute_id` = (SELECT `attribute_id` FROM `eav_attribute` WHERE `attribute_code` = 'sku');"
|
24 |
);
|
25 |
$installer->endSetup();
|
26 |
+
|
27 |
+
$catalogSetup = new Mage_Eav_Model_Entity_Setup('core_setup');
|
28 |
+
$catalogSetup->startSetup();
|
29 |
+
$catalogSetup->addAttribute('catalog_product', 'enable_social_discount', array(
|
30 |
+
'type' => 'int',
|
31 |
+
'backend' => '',
|
32 |
+
'frontend' => '',
|
33 |
+
'label' => 'Enable Social Discount',
|
34 |
+
'input' => 'boolean',
|
35 |
+
'class' => '',
|
36 |
+
'source' => 'adminhtml/system_config_source_yesno',
|
37 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
|
38 |
+
'visible' => true,
|
39 |
+
'required' => false,
|
40 |
+
'user_defined' => true,
|
41 |
+
'default' => 1,
|
42 |
+
'searchable' => true,
|
43 |
+
'filterable' => false,
|
44 |
+
'comparable' => false,
|
45 |
+
'visible_on_front' => false,
|
46 |
+
'unique' => false,
|
47 |
+
'group' => 'General',
|
48 |
+
'attribute_set' => 'Default'
|
49 |
+
));
|
50 |
+
$catalogSetup->endSetup();
|
51 |
+
|
app/code/community/Netsol/SocialDiscount/sql/netsol_sd_setup/mysql4-upgrade-1.0.0-1.0.1.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* No difference in database */
|
app/design/frontend/base/default/layout/netsol_sd.xml
CHANGED
@@ -1,12 +1,20 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.1.0">
|
3 |
-
<
|
4 |
<reference name="head">
|
5 |
<action method="addJs"><script>netsol/social_discount/jquery.min.2.0.js</script></action>
|
|
|
|
|
|
|
|
|
6 |
<action method="addItem">
|
7 |
<type>skin_css</type>
|
8 |
<file>css/netsol/social_discount.css</file>
|
9 |
</action>
|
|
|
|
|
|
|
|
|
10 |
</reference>
|
11 |
<reference name="alert.urls">
|
12 |
<block type="netsol_sd/buttons" name="social.discount" as="social.discount" after="-">
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
<reference name="head">
|
5 |
<action method="addJs"><script>netsol/social_discount/jquery.min.2.0.js</script></action>
|
6 |
+
</reference>
|
7 |
+
</default>
|
8 |
+
<catalog_product_view>
|
9 |
+
<reference name="head">
|
10 |
<action method="addItem">
|
11 |
<type>skin_css</type>
|
12 |
<file>css/netsol/social_discount.css</file>
|
13 |
</action>
|
14 |
+
<action method="removeItem">
|
15 |
+
<type>skin_js</type>
|
16 |
+
<file>js/jqzoom/jquery-1.3.1.min.js</file>
|
17 |
+
</action>
|
18 |
</reference>
|
19 |
<reference name="alert.urls">
|
20 |
<block type="netsol_sd/buttons" name="social.discount" as="social.discount" after="-">
|
app/design/frontend/base/default/template/netsol/social_discount/buttons.phtml
CHANGED
@@ -1,86 +1,122 @@
|
|
1 |
<?php $_product = $this->getProduct() ?>
|
2 |
-
|
|
|
|
|
3 |
|
4 |
-
<div id="netsol_sd_buttons">
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
32 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
-
);
|
35 |
});
|
36 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
});
|
38 |
-
|
39 |
-
<a href="javascript:void(0);" id="facebook_social_discount">Facebook</a>
|
40 |
-
<?php endif; ?>
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
jQ("#twitter_social_discount").click(function() {
|
49 |
-
jQ(this).addClass('social_loader');
|
50 |
jQ.ajax({
|
51 |
method: "POST",
|
52 |
-
url: "<?php echo $this->getUrl('socialdiscount/
|
53 |
-
data: {'
|
54 |
}).done(function(response) {
|
55 |
if(response.success) {
|
56 |
-
|
57 |
} else {
|
58 |
-
jQ("
|
59 |
}
|
60 |
});
|
61 |
-
}
|
62 |
});
|
63 |
-
</script>
|
64 |
-
<a href="javascript:void(0);" id="twitter_social_discount">Twitter</a>
|
65 |
-
<?php endif; ?>
|
66 |
-
|
67 |
-
<span id="coupon_code"></span>
|
68 |
-
</div>
|
69 |
-
|
70 |
-
<script>
|
71 |
-
function processSocialDiscount(feedId, sku, media) {
|
72 |
-
jQ.ajax({
|
73 |
-
method: "POST",
|
74 |
-
url: "<?php echo $this->getUrl('socialdiscount/coupon/process') ?>",
|
75 |
-
data: {'feedId': feedId, 'sku': sku, 'media': media}
|
76 |
-
}).done(function(response) {
|
77 |
-
if(response.success) {
|
78 |
-
var icon = media+'_social_discount';
|
79 |
-
jQ("#"+icon.toLowerCase()).hide();
|
80 |
-
jQ("#coupon_code").html('Coupon Code: '+response.coupon);
|
81 |
-
} else {
|
82 |
-
jQ("#coupon_code").html('No response found, please check agagin.');
|
83 |
-
}
|
84 |
});
|
85 |
-
|
86 |
-
|
1 |
<?php $_product = $this->getProduct() ?>
|
2 |
+
<?php if(Mage::helper('netsol_sd')->isValidIP() && $_product->getEnableSocialDiscount()) : ?>
|
3 |
+
|
4 |
+
<script>var jQ = jQuery.noConflict();</script>
|
5 |
|
6 |
+
<div id="netsol_sd_buttons">
|
7 |
+
<?php
|
8 |
+
/* check if facebook sharing is enabled */
|
9 |
+
if(Mage::helper('netsol_sd')->isFacebookEnabled()) :
|
10 |
+
?>
|
11 |
+
<script>
|
12 |
+
jQ(document).ready(function() {
|
13 |
+
jQ.ajaxSetup({ cache: true });
|
14 |
+
jQ.getScript('//connect.facebook.net/en_US/sdk.js', function(){
|
15 |
+
FB.init({
|
16 |
+
appId: '<?php echo Mage::helper('netsol_sd')->getFacebookAppId() ?>',
|
17 |
+
xfbml: true,
|
18 |
+
version: 'v2.3' //or v2.0, v2.1, v2.0
|
19 |
+
});
|
20 |
+
|
21 |
+
jQ("#facebook_social_discount").click(function() {
|
22 |
+
FB.ui({
|
23 |
+
method: 'feed',
|
24 |
+
name: "<?php echo str_replace('"', '', $_product->getName()) ?>",
|
25 |
+
link: '<?php echo Mage::helper('core/url')->getCurrentUrl() ?>',
|
26 |
+
picture: '<?php echo Mage::helper('catalog/image')->init($_product, 'thumbnail') ?>',
|
27 |
+
description: "<?php echo str_replace('"', '', preg_replace('/\s+/S', " ", strip_tags($_product->getShortDescription()))) ?>"
|
28 |
+
},
|
29 |
+
function(response) {
|
30 |
+
if (response && response.post_id) {
|
31 |
+
processSocialDiscount(response.post_id, '<?php echo $_product->getSku() ?>', 'Facebook');
|
32 |
+
} /* else {
|
33 |
+
alert('No response from facebook, please check agagin.');
|
34 |
+
} */
|
35 |
}
|
36 |
+
);
|
37 |
+
});
|
38 |
+
});
|
39 |
+
});
|
40 |
+
</script>
|
41 |
+
<a href="javascript:void(0);" id="facebook_social_discount">Facebook</a>
|
42 |
+
<?php endif; ?>
|
43 |
+
|
44 |
+
<?php
|
45 |
+
/* check if twitter sharing is enabled */
|
46 |
+
if(Mage::helper('netsol_sd')->isTwitterEnabled()) :
|
47 |
+
?>
|
48 |
+
<script>
|
49 |
+
jQ(document).ready(function() {
|
50 |
+
jQ("#twitter_social_discount").click(function() {
|
51 |
+
jQ(this).addClass('social_loader');
|
52 |
+
jQ.ajax({
|
53 |
+
method: "POST",
|
54 |
+
url: "<?php echo $this->getUrl('socialdiscount/twitter/postFeed') ?>",
|
55 |
+
data: {'productId': '<?php echo $_product->getId() ?>'}
|
56 |
+
}).done(function(response) {
|
57 |
+
if(response.success) {
|
58 |
+
processSocialDiscount(response.post_id, '<?php echo $_product->getSku() ?>', 'Twitter');
|
59 |
+
} else {
|
60 |
+
jQ("#coupon_code").html('No response from twitter, please check agagin.');
|
61 |
}
|
62 |
+
});
|
63 |
});
|
64 |
});
|
65 |
+
</script>
|
66 |
+
<a href="javascript:void(0);" id="twitter_social_discount">Twitter</a>
|
67 |
+
<?php endif; ?>
|
68 |
+
|
69 |
+
<div class="response">
|
70 |
+
<span id="coupon_code_text"></span>
|
71 |
+
<div class="form">
|
72 |
+
<input type="email" id="sd_email" name="sd_email" placeholder="Email me this coupon" />
|
73 |
+
<input type="hidden" id="coupon_code" class="coupon_code" />
|
74 |
+
<button type="button" class="button" id="send_coupon"><span><span>Send</span></span></button>
|
75 |
+
<span class="sd_message"></span>
|
76 |
+
</div>
|
77 |
+
</div>
|
78 |
+
</div>
|
79 |
+
|
80 |
+
<script>
|
81 |
+
function processSocialDiscount(feedId, sku, media) {
|
82 |
+
jQ.ajax({
|
83 |
+
method: "POST",
|
84 |
+
url: "<?php echo $this->getUrl('socialdiscount/coupon/process') ?>",
|
85 |
+
data: {'feedId': feedId, 'sku': sku, 'media': media}
|
86 |
+
}).done(function(response) {
|
87 |
+
if(response.success) {
|
88 |
+
var icon = media+'_social_discount';
|
89 |
+
jQ("#"+icon.toLowerCase()).hide();
|
90 |
+
jQ("#coupon_code_text").html('Coupon Code: '+response.coupon);
|
91 |
+
jQ("#coupon_code").val(response.coupon);
|
92 |
+
jQ(".response .form").show();
|
93 |
+
} else {
|
94 |
+
jQ("#coupon_code_text").html('No response found, please check agagin.');
|
95 |
+
}
|
96 |
+
|
97 |
+
jQ(".response").show();
|
98 |
});
|
99 |
+
}
|
|
|
|
|
100 |
|
101 |
+
jQ(document).ready(function() {
|
102 |
+
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
103 |
+
jQ("#netsol_sd_buttons").on('click', '#send_coupon', function() {
|
104 |
+
if(jQ("#sd_email").val() == '' || !regex.test(jQ("#sd_email").val())) {
|
105 |
+
jQ(".sd_message").html('Invalid email address');
|
106 |
+
} else {
|
|
|
|
|
107 |
jQ.ajax({
|
108 |
method: "POST",
|
109 |
+
url: "<?php echo $this->getUrl('socialdiscount/coupon/sendCouponEmail') ?>",
|
110 |
+
data: {'coupon_code': jQ("#coupon_code").val(), 'customer_email': jQ("#sd_email").val()}
|
111 |
}).done(function(response) {
|
112 |
if(response.success) {
|
113 |
+
jQ(".sd_message").html('Email has been set successfully.');
|
114 |
} else {
|
115 |
+
jQ(".sd_message").html('Email not sent, please contact with adminstrator');
|
116 |
}
|
117 |
});
|
118 |
+
}
|
119 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
});
|
121 |
+
</script>
|
122 |
+
<?php endif ?>
|
app/locale/en_US/template/email/sd_send_coupon_email.html
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!--@subject Social Discount Coupon @-->
|
2 |
+
<!--@vars
|
3 |
+
{"store url=\"\"":"Store Url",
|
4 |
+
"var logo_url":"Email Logo Image Url"}
|
5 |
+
@-->
|
6 |
+
|
7 |
+
<!--@styles
|
8 |
+
@-->
|
9 |
+
|
10 |
+
<body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
|
11 |
+
<div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
|
12 |
+
<table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
|
13 |
+
<tr>
|
14 |
+
<td align="center" valign="top" style="padding:20px 0 20px 0">
|
15 |
+
<!-- [ header starts here] -->
|
16 |
+
<table bgcolor="FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
|
17 |
+
<tr>
|
18 |
+
<td valign="top">
|
19 |
+
<a href="{{store url=""}}"><img src="{{skin url="images/logo_email.gif" _area='frontend'}}" alt="{{var store.getFrontendName()}}" style="margin-bottom:10px;" border="0"/></a></td>
|
20 |
+
</tr>
|
21 |
+
<tr>
|
22 |
+
<td class="action-content">
|
23 |
+
<p>Dear <strong>{{var customer_name}}</strong>,</p>
|
24 |
+
<p>Thank you to share our product(s) on your social profile. Use this coupon <strong>{{var coupon_code}}</strong> to get discount.</p>
|
25 |
+
<p>Enjoy Shopping with {{var store.getFrontendName()}}</p>
|
26 |
+
<p style="font-size:12px; line-height:16px; margin:0;">If you have any questions about your account or any other matter, please feel free to contact us at <a href="mailto:{{config path='trans_email/ident_support/email'}}" style="color:#1E7EC8;">{{config path='trans_email/ident_support/email'}}</a>.</p>
|
27 |
+
</td>
|
28 |
+
</tr>
|
29 |
+
</table>
|
30 |
+
</td>
|
31 |
+
</tr>
|
32 |
+
</table>
|
33 |
+
</div>
|
34 |
+
</body>
|
package.xml
CHANGED
@@ -1,23 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Netsol_Social_Discount</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>
|
11 |
-
|
12 |
-
Features:
|
13 |
-
Can set discount amount from admin
|
14 |
-
Can set coupon length
|
15 |
-
Can block list IP's for fake customers</description>
|
16 |
-
<notes>1.0.0 is stable version.</notes>
|
17 |
<authors><author><name>Netsol</name><user>net_solutions</user><email>marketing@netsolutionsindia.com</email></author></authors>
|
18 |
-
<date>2015-
|
19 |
-
<time>
|
20 |
-
<contents><target name="magecommunity"><dir name="Netsol"><dir name="SocialDiscount"><dir name="Block"><dir name="Adminhtml"><dir name="Report"><file name="Grid.php" hash="
|
21 |
<compatible/>
|
22 |
-
<dependencies><required><php><min>5.
|
23 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Netsol_Social_Discount</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Customer get discount coupon after sharing products on facebook.</summary>
|
10 |
+
<description>It helps vendor's to promote their products on facebook. Customer share products on their facebook profile to get discounts.</description>
|
11 |
+
<notes>Its stable version for 1.7, 1.8 & 1.9.</notes>
|
|
|
|
|
|
|
|
|
|
|
12 |
<authors><author><name>Netsol</name><user>net_solutions</user><email>marketing@netsolutionsindia.com</email></author></authors>
|
13 |
+
<date>2015-07-03</date>
|
14 |
+
<time>09:21:28</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Netsol"><dir name="SocialDiscount"><dir name="Block"><dir name="Adminhtml"><file name="Analyticreport.php" hash="ae6cdca1c14836e10ef5e2722b55cf9d"/><dir name="Report"><dir name="Analytic"><file name="Grid.php" hash="ecf944c240e30e59e9aea31067446d11"/></dir><file name="Grid.php" hash="1071720acc1d192beec421f651e4dfbd"/></dir><file name="Report.php" hash="147d846461fbb66d0028dfe1ba07b305"/></dir><file name="Buttons.php" hash="648a6e0180ef937fc0feddd3d2588ea5"/></dir><dir name="Helper"><file name="Data.php" hash="510a8545456298a07b489f6bbb2163a3"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Analyticreport"><file name="Collection.php" hash="6fb26f16b5f5accbe4970a383bbff0dd"/></dir><dir name="Socialdiscount"><file name="Collection.php" hash="1328aea184ef16baf06bc3f7d39f7ec5"/></dir><file name="Socialdiscount.php" hash="831c3ec519200cd9fc5c975ee7949ba6"/></dir><file name="Observer.php" hash="155cb9325c199fc92091a56f0d46ebb6"/><file name="Socialdiscount.php" hash="ac9fdf0e1e3462e3a49a4e307fe309e0"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Couponpermission.php" hash="be48d1ca59040ffffbb5013a03a21be4"/><file name="Coupontype.php" hash="df769bd451b06d2138d2727fad21e940"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="SocialdiscountController.php" hash="1edee887ee546910c48ea522632c2a15"/></dir><file name="CouponController.php" hash="76a5892110067eb379dcfc9bafd2fb5b"/><file name="TwitterController.php" hash="29f0f9876542b4bebcf2c78d9f377380"/></dir><dir name="data"><dir name="netsol_sd_setup"><file name="data-install-1.0.0.php" hash="f03638a17e90376611c01d979b4ae057"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="35533b3d767d8d6c85bc940443167607"/><file name="config.xml" hash="f6dbe5732ab74b346897e38e1523955a"/><file name="system.xml" hash="e77edd46b1a9c413143ffd45350f7612"/></dir><dir name="sql"><dir name="netsol_sd_setup"><file name="mysql4-install-1.0.1.php" hash="808f45e8d5c3fb1bfed5fc80a7de9687"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="ecdaefef485fc41cecc9de89fad97737"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="netsol_sd.xml" hash="97a93c7d7cba4b1245e988f3a28919cd"/></dir><dir name="template"><dir name="netsol"><dir name="social_discount"><file name="buttons.phtml" hash="74f09f3048bef1921a67fbe1fae99aed"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Netsol_SocialDiscount.xml" hash="df8f78d5cc2fa271fda41d7d143b79b3"/></dir></target><target name="magelib"><dir name="."><file name="TwitterAPIExchange.php" hash="431aa757cd8a4d138c5a25f48ff55a9d"/></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="sd_send_coupon_email.html" hash="a08438cc93f815c7ef9771318fc9f413"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="netsol"><dir name="brand"><file name="brand.css" hash="0d50eb5431f3edce2ba5ffcbc8667881"/><file name="jquery.bxslider.css" hash="22c455a0fb61b2a1e0a7dadd1f95e386"/><file name="tinycarousel.css" hash="ecad2eafca22937aba7cb5ec87fe9715"/></dir><file name="social_discount.css" hash="3ce766d5dcfb29d5741ced8b01971151"/></dir></dir><dir name="images"><dir name="netsol"><dir name="brand"><file name="bullet.png" hash="117c0297bac6096d62702893e7d7b840"/><file name="bx_loader.gif" hash="931bdb6b50816b03206c66921760b246"/><file name="controls.png" hash="d9d25372f38c6b242b9b51d5841fe86e"/><file name="loading.gif" hash="3eb63d6867e720e525cca07b3e33afbc"/><file name="product_loader.gif" hash="03b6aa9d61525f4f9dd41512ea7134a4"/><file name="small_image.jpg" hash="f825d16f97a640453553c79c48ebaa73"/></dir><file name="facebook.png" hash="a4613948b5f4e781636894889da1c5e4"/><file name="social_loader.gif" hash="03b6aa9d61525f4f9dd41512ea7134a4"/><file name="twitter.png" hash="9ad336f9401d8ac9334e0c7ab0394f47"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="netsol"><dir name="social_discount"><file name="jquery.min.2.0.js" hash="2edc942c0bd2476be8967a9f788d9e26"/></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
skin/frontend/base/default/css/netsol/brand/brand.css
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.autoSerachBrand { padding:10px; background-color:#eee; max-width:400px; border-radius:7px; }
|
2 |
+
.autoSerachBrand label { display:block; }
|
3 |
+
.autoSerachBrand .input-text { padding-left:30px; width:100%; background:url(search-ico.png) no-repeat 5px 50% #fff; border:1px solid #ddd; border-radius:4px;
|
4 |
+
box-sizing:border-box; }
|
5 |
+
|
6 |
+
.brandLogoSlider { position:relative; margin:0 auto; max-width:1200px; }
|
7 |
+
.brandLogoSlider img { max-width:100%; margin:auto; }
|
8 |
+
.brandLogoSlider .title { color:#1a2a40; font-size:24px; padding:20px 0 10px; position:relative; text-transform:uppercase; font-weight:600; }
|
9 |
+
.brandLogoSlider .container { padding:10px; position:relative; }
|
10 |
+
|
11 |
+
.logoSlider { position:relative; overflow:hidden; z-index:1; }
|
12 |
+
|
13 |
+
.jcarousel-wrapper { margin:0 auto; position:relative; }
|
14 |
+
.logoSlider ul { width:2000em; position:relative; z-index:1; }
|
15 |
+
.std .logoSlider ul {margin-bottom:0.5em;}
|
16 |
+
.std .logoSlider ul li {margin-left:0.5em}
|
17 |
+
.logoSlider ul li { float:left; padding:10px; text-align:center; position:relative; background-color:#fff; border:1px solid #d5d5d5; list-style:none; margin-left:10px; }
|
18 |
+
.logoSlider ul li a { display:block; text-align:center; }
|
19 |
+
|
20 |
+
.brandLogoSlider .logoSlider-prev,
|
21 |
+
.brandLogoSlider .logoSlider-next { display:inline-block; width:22px; height:22px; background:url(arrow.png) no-repeat 0 0 #efefef; border-radius:50%;
|
22 |
+
position:absolute; top:50%; margin-top:-11px; cursor:pointer; opacity:1; }
|
23 |
+
.brandLogoSlider .logoSlider-prev { left:-10px; }
|
24 |
+
.brandLogoSlider .logoSlider-next { right:-20px; background-position:100% 0; }
|
25 |
+
.brandLogoSlider .logoSlider-prev:hover, .brandLogoSlider .logoSlider-next:hover { opacity:0.5; }
|
26 |
+
|
27 |
+
/*****---- Verticle Slider ------*******/
|
28 |
+
.brandLogoSlider.vertical { max-width:350px; }
|
29 |
+
.vertical .logoSlider ul { width:auto; height:350px; }
|
30 |
+
.vertical .logoSlider ul li { float:none; width:auto; margin:0 0 10px; }
|
31 |
+
.vertical .logoSlider-prev,
|
32 |
+
.vertical .logoSlider-next { top:auto; left:50%; bottom:-9px; }
|
33 |
+
.vertical .logoSlider-prev { margin-left:-30px; background-position:0 100%; }
|
34 |
+
.vertical .logoSlider-next { margin-right:-30px; background-position:100% 100%; }
|
35 |
+
|
36 |
+
/*****---- Featured Brand Slider ------*******/
|
37 |
+
.featuredBrandsWrapper { padding:15px; background-color:#efefef; }
|
38 |
+
.featuredBrands { max-width:1200px; margin:0 auto; position:relative; }
|
39 |
+
.featuredBrands .title { font-size:30px; text-align:center; margin:0; }
|
40 |
+
.featuredBrands .container { padding:10px; }
|
41 |
+
.featuredBrands img { max-width:100%; margin:auto; }
|
42 |
+
.featuredBrands .logoSlider-prev,
|
43 |
+
.featuredBrands .logoSlider-next { display:inline-block; width:22px; height:22px; background:url(arrow.png) no-repeat 0 0 #fff; border-radius:50%;
|
44 |
+
position:absolute; top:55%; cursor:pointer; opacity:1; }
|
45 |
+
.featuredBrands .logoSlider-prev { left:-15px; }
|
46 |
+
.featuredBrands .logoSlider-next { right:-15px; background-position:100% 0; }
|
47 |
+
.featuredBrands .logoSlider-prev:hover, .brandLogoSlider .logoSlider-next:hover { opacity:0.5; }
|
48 |
+
|
49 |
+
/*****---- All Brand Slider ------*******/
|
50 |
+
.allBrands { padding:15px 0; }
|
51 |
+
.allBrands .resultInfoLoadingImg {display:block;margin:auto;display:none;}
|
52 |
+
.allBrands .title { font-size:30px; margin-bottom:15px; }
|
53 |
+
.allBrands .letter { clear:both; font-size:16px; padding:7px 10px; background-color:#eee; }
|
54 |
+
.allBrands ul.brandlist li { float:left; padding:10px; margin:0 10px 10px 0; text-align:center; position:relative; background-color:#fff; border:1px solid #ccc; }
|
55 |
+
.col-main .allBrands ul.brandlist li {list-style:none;}
|
56 |
+
|
57 |
+
|
58 |
+
.alphaBets { padding:7px; background-color:#eee; }
|
59 |
+
.alphaBets li { float:left; margin:3px;list-style:none; }
|
60 |
+
.alphaBets button.alpha { color:#333; font-size:14px; width:25px; height:25px; background-color:#fff; border:0 none; border-radius:4px; }
|
61 |
+
.alphaBets button.alpha:hover { color:#000; background-color:#ccc; }
|
62 |
+
.alphaBets button.alpha.active { color:#fff; background-color:#444; }
|
63 |
+
.allbrand span {vertical-align:bottom;position:fixed;}
|
64 |
+
.resultInfo { padding:10px; border:5px solid #eee; border-top:0 none; }
|
65 |
+
.resultInfo ul {list-style:none; border:none;}
|
66 |
+
.resultInfo ul li a span {position:fixed;}
|
67 |
+
.resultInfo li { float:left; padding:10px; margin:0 10px 10px 0; text-align:center; position:relative; background-color:#fff; border:1px solid #ccc; }
|
68 |
+
.resultInfo li a { display:block; }
|
69 |
+
.note { color:#09F; font-size:12px; }
|
70 |
+
|
71 |
+
/*****---- Tooltip Box ------*******/
|
72 |
+
.ui-tooltip { color:#333; font-size:12px; line-height:16px; padding:12px; max-width:300px; background-color:#efefef;
|
73 |
+
border:1px solid #ddd; border-radius:6px; box-shadow:2px 2px 3px rgba(0,0,0,0.4); z-index:999; position:absolute; }
|
74 |
+
.ui-helper-hidden-accessible {display:none;}
|
75 |
+
|
76 |
+
.ui-autocomplete { color:#333; font-size:12px; padding:7px; background-color:#fff; border:2px solid #eee; width:250px; border-radius:6px; box-shadow:2px 2px 3px rgba(0,0,0,0.4); position:absolute; z-index:10000;}
|
77 |
+
.ui-autocomplete li { padding:5px; border-top:1px dotted #ccc; }
|
78 |
+
.ui-autocomplete li:first-child { border:0 none; }
|
79 |
+
.ui-autocomplete li:hover { background-color:#eee; }
|
80 |
+
|
81 |
+
.product-shop .Brandlogo { clear:both; margin:10px 0; }
|
82 |
+
|
83 |
+
|
84 |
+
.logoSlider ul:after, .allBrands ul:after, .alphaBets ul:after,
|
85 |
+
.resultInfo ul:after { content:'.'; display:block; clear:both; width:0; height:0; overflow:hidden; }
|
86 |
+
|
87 |
+
button, html input[type="button"], input[type="reset"], input[type="submit"] {cursor: pointer;}
|
88 |
+
#brand_detail{float:left; width:100%}
|
89 |
+
#brand_detail .brand-name{color: #636363; font-size:24px;}
|
90 |
+
.brand-category-products{padding: 25px 0 0; float:left; width: 100%;}
|
91 |
+
#brand_detail .brandinfo{width:100%;}
|
92 |
+
.brandinfo_baseimage{float: left; border: 1px solid #CCCCCC; margin: 0 10px 10px 0;padding: 0 1px 0 10px;text-align:center;}
|
93 |
+
.brandinfo_baseimage .brand_baseimage {float: left; padding: 0 10px 10px 0;}
|
94 |
+
|
95 |
+
.brand-info .brand-description{text-align: left; line-height:20px; width: 100%;}
|
96 |
+
.col-main .brand-category-view {float: left; width: 100%; }
|
97 |
+
|
98 |
+
.brand-category-products .products-grid{padding:0;margin: 0 0 40px;}
|
99 |
+
.nav-primary a.level-top { padding: 0 25px;}
|
100 |
+
.brand-category-view .sort-by a{float: left;margin: 9px 0 6px;}
|
skin/frontend/base/default/css/netsol/brand/jquery.bxslider.css
ADDED
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* BxSlider v4.1.2 - Fully loaded, responsive content slider
|
3 |
+
* http://bxslider.com
|
4 |
+
*
|
5 |
+
* Written by: Steven Wanderski, 2014
|
6 |
+
* http://stevenwanderski.com
|
7 |
+
* (while drinking Belgian ales and listening to jazz)
|
8 |
+
*
|
9 |
+
* CEO and founder of bxCreative, LTD
|
10 |
+
* http://bxcreative.com
|
11 |
+
*/
|
12 |
+
|
13 |
+
|
14 |
+
/** RESET AND LAYOUT
|
15 |
+
===================================*/
|
16 |
+
|
17 |
+
.bx-wrapper {
|
18 |
+
position: relative;
|
19 |
+
margin: 0 auto 60px;
|
20 |
+
padding: 0;
|
21 |
+
*zoom: 1;
|
22 |
+
}
|
23 |
+
|
24 |
+
.bx-wrapper img {
|
25 |
+
max-width: 100%;
|
26 |
+
display: block;
|
27 |
+
}
|
28 |
+
|
29 |
+
/** THEME
|
30 |
+
===================================*/
|
31 |
+
|
32 |
+
.bx-wrapper .bx-viewport {
|
33 |
+
-moz-box-shadow: 0 0 5px #ccc;
|
34 |
+
-webkit-box-shadow: 0 0 5px #ccc;
|
35 |
+
box-shadow: 0 0 5px #ccc;
|
36 |
+
border: 5px solid #fff;
|
37 |
+
left: -5px;
|
38 |
+
background: #fff;
|
39 |
+
|
40 |
+
/*fix other elements on the page moving (on Chrome)*/
|
41 |
+
-webkit-transform: translatez(0);
|
42 |
+
-moz-transform: translatez(0);
|
43 |
+
-ms-transform: translatez(0);
|
44 |
+
-o-transform: translatez(0);
|
45 |
+
transform: translatez(0);
|
46 |
+
}
|
47 |
+
|
48 |
+
.bx-wrapper .bx-pager,
|
49 |
+
.bx-wrapper .bx-controls-auto {
|
50 |
+
position: absolute;
|
51 |
+
bottom: -30px;
|
52 |
+
width: 100%;
|
53 |
+
}
|
54 |
+
|
55 |
+
/* LOADER */
|
56 |
+
|
57 |
+
.bx-wrapper .bx-loading {
|
58 |
+
min-height: 50px;
|
59 |
+
background: url(../../../images/netsol/brand/bx_loader.gif) center center no-repeat #fff;
|
60 |
+
height: 100%;
|
61 |
+
width: 100%;
|
62 |
+
position: absolute;
|
63 |
+
top: 0;
|
64 |
+
left: 0;
|
65 |
+
z-index: 2000;
|
66 |
+
}
|
67 |
+
|
68 |
+
/* PAGER */
|
69 |
+
|
70 |
+
.bx-wrapper .bx-pager {
|
71 |
+
text-align: center;
|
72 |
+
font-size: .85em;
|
73 |
+
font-family: Arial;
|
74 |
+
font-weight: bold;
|
75 |
+
color: #666;
|
76 |
+
padding-top: 20px;
|
77 |
+
}
|
78 |
+
|
79 |
+
.bx-wrapper .bx-pager .bx-pager-item,
|
80 |
+
.bx-wrapper .bx-controls-auto .bx-controls-auto-item {
|
81 |
+
display: inline-block;
|
82 |
+
*zoom: 1;
|
83 |
+
*display: inline;
|
84 |
+
}
|
85 |
+
|
86 |
+
.bx-wrapper .bx-pager.bx-default-pager a {
|
87 |
+
background: #666;
|
88 |
+
text-indent: -9999px;
|
89 |
+
display: block;
|
90 |
+
width: 10px;
|
91 |
+
height: 10px;
|
92 |
+
margin: 0 5px;
|
93 |
+
outline: 0;
|
94 |
+
-moz-border-radius: 5px;
|
95 |
+
-webkit-border-radius: 5px;
|
96 |
+
border-radius: 5px;
|
97 |
+
}
|
98 |
+
|
99 |
+
.bx-wrapper .bx-pager.bx-default-pager a:hover,
|
100 |
+
.bx-wrapper .bx-pager.bx-default-pager a.active {
|
101 |
+
background: #000;
|
102 |
+
}
|
103 |
+
|
104 |
+
/* DIRECTION CONTROLS (NEXT / PREV) */
|
105 |
+
|
106 |
+
.bx-wrapper .bx-prev {
|
107 |
+
left: 10px;
|
108 |
+
background: url(../../../images/netsol/brand/controls.png) no-repeat 0 -32px;
|
109 |
+
}
|
110 |
+
|
111 |
+
.bx-wrapper .bx-next {
|
112 |
+
right: 10px;
|
113 |
+
background: url(../../../images/netsol/brand/controls.png) no-repeat -43px -32px;
|
114 |
+
}
|
115 |
+
|
116 |
+
.bx-wrapper .bx-prev:hover {
|
117 |
+
background-position: 0 0;
|
118 |
+
}
|
119 |
+
|
120 |
+
.bx-wrapper .bx-next:hover {
|
121 |
+
background-position: -43px 0;
|
122 |
+
}
|
123 |
+
|
124 |
+
.bx-wrapper .bx-controls-direction a {
|
125 |
+
position: absolute;
|
126 |
+
top: 50%;
|
127 |
+
margin-top: -16px;
|
128 |
+
outline: 0;
|
129 |
+
width: 32px;
|
130 |
+
height: 32px;
|
131 |
+
text-indent: -9999px;
|
132 |
+
z-index: 9999;
|
133 |
+
}
|
134 |
+
|
135 |
+
.bx-wrapper .bx-controls-direction a.disabled {
|
136 |
+
display: none;
|
137 |
+
}
|
138 |
+
|
139 |
+
/* AUTO CONTROLS (START / STOP) */
|
140 |
+
|
141 |
+
.bx-wrapper .bx-controls-auto {
|
142 |
+
text-align: center;
|
143 |
+
}
|
144 |
+
|
145 |
+
.bx-wrapper .bx-controls-auto .bx-start {
|
146 |
+
display: block;
|
147 |
+
text-indent: -9999px;
|
148 |
+
width: 10px;
|
149 |
+
height: 11px;
|
150 |
+
outline: 0;
|
151 |
+
background: url(../../../images/netsol/brand/controls.png) -86px -11px no-repeat;
|
152 |
+
margin: 0 3px;
|
153 |
+
}
|
154 |
+
|
155 |
+
.bx-wrapper .bx-controls-auto .bx-start:hover,
|
156 |
+
.bx-wrapper .bx-controls-auto .bx-start.active {
|
157 |
+
background-position: -86px 0;
|
158 |
+
}
|
159 |
+
|
160 |
+
.bx-wrapper .bx-controls-auto .bx-stop {
|
161 |
+
display: block;
|
162 |
+
text-indent: -9999px;
|
163 |
+
width: 9px;
|
164 |
+
height: 11px;
|
165 |
+
outline: 0;
|
166 |
+
background: url(../../../images/controls.png) -86px -44px no-repeat;
|
167 |
+
margin: 0 3px;
|
168 |
+
}
|
169 |
+
|
170 |
+
.bx-wrapper .bx-controls-auto .bx-stop:hover,
|
171 |
+
.bx-wrapper .bx-controls-auto .bx-stop.active {
|
172 |
+
background-position: -86px -33px;
|
173 |
+
}
|
174 |
+
|
175 |
+
/* PAGER WITH AUTO-CONTROLS HYBRID LAYOUT */
|
176 |
+
|
177 |
+
.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager {
|
178 |
+
text-align: left;
|
179 |
+
width: 80%;
|
180 |
+
}
|
181 |
+
|
182 |
+
.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto {
|
183 |
+
right: 0;
|
184 |
+
width: 35px;
|
185 |
+
}
|
186 |
+
|
187 |
+
/* IMAGE CAPTIONS */
|
188 |
+
|
189 |
+
.bx-wrapper .bx-caption {
|
190 |
+
position: absolute;
|
191 |
+
bottom: 0;
|
192 |
+
left: 0;
|
193 |
+
background: #666\9;
|
194 |
+
background: rgba(80, 80, 80, 0.75);
|
195 |
+
width: 100%;
|
196 |
+
}
|
197 |
+
|
198 |
+
.bx-wrapper .bx-caption span {
|
199 |
+
color: #fff;
|
200 |
+
font-family: Arial;
|
201 |
+
display: block;
|
202 |
+
font-size: .85em;
|
203 |
+
padding: 10px;
|
204 |
+
}
|
205 |
+
|
206 |
+
.footer .featurebrand .bx-wrapper{bottom: 26px;}
|
skin/frontend/base/default/css/netsol/brand/tinycarousel.css
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* slider1 */
|
2 |
+
#slider1 {
|
3 |
+
margin: 0 0 20px;
|
4 |
+
overflow: hidden;
|
5 |
+
padding: 0 40px;
|
6 |
+
position: relative;
|
7 |
+
width:50%
|
8 |
+
}
|
9 |
+
#slider1 .viewport {
|
10 |
+
float: left;
|
11 |
+
width: 100%;
|
12 |
+
height: 123px;
|
13 |
+
overflow: hidden;
|
14 |
+
position: relative;
|
15 |
+
}
|
16 |
+
#slider1 .buttons {
|
17 |
+
background: #C01313;
|
18 |
+
border-radius: 35px;
|
19 |
+
display: block;
|
20 |
+
margin: 30px 0 0;
|
21 |
+
width: 35px;
|
22 |
+
height: 35px;
|
23 |
+
position: absolute;
|
24 |
+
left: 0;
|
25 |
+
top: 0;
|
26 |
+
color: #fff;
|
27 |
+
font-weight: bold;
|
28 |
+
text-align: center;
|
29 |
+
line-height: 35px;
|
30 |
+
text-decoration: none;
|
31 |
+
font-size: 22px;
|
32 |
+
}
|
33 |
+
#slider1 .next {
|
34 |
+
margin: 30px 0 0;
|
35 |
+
left: auto;
|
36 |
+
right: 0;
|
37 |
+
top: 0;
|
38 |
+
}
|
39 |
+
#slider1 .buttons:hover{
|
40 |
+
color: #C01313;
|
41 |
+
background: #fff;
|
42 |
+
}
|
43 |
+
#slider1 .disable {
|
44 |
+
visibility: hidden;
|
45 |
+
}
|
46 |
+
#slider1 .overview {
|
47 |
+
list-style: none;
|
48 |
+
position: absolute;
|
49 |
+
left: 0;
|
50 |
+
top: 0;
|
51 |
+
}
|
52 |
+
#slider1 .overview li{
|
53 |
+
float: left;
|
54 |
+
margin: 0 20px 0 0;
|
55 |
+
overflow: hidden;
|
56 |
+
height: 121px;
|
57 |
+
border: 1px solid #dcdcdc;
|
58 |
+
width: 150px;
|
59 |
+
}
|
60 |
+
|
61 |
+
#slider1 .overview li a{
|
62 |
+
float: left;
|
63 |
+
margin: 0 20px 0 0;
|
64 |
+
overflow: hidden;
|
65 |
+
height: 121px;
|
66 |
+
border: 1px solid #dcdcdc;
|
67 |
+
width: 150px;
|
68 |
+
padding: 20px 15px 0 15px;
|
69 |
+
}
|
70 |
+
|
71 |
+
.footer{background:none !important;}
|
skin/frontend/base/default/css/netsol/social_discount.css
CHANGED
@@ -1,20 +1,12 @@
|
|
1 |
#netsol_sd_buttons{width:100%; float:left;}
|
2 |
-
#facebook_social_discount, #twitter_social_discount {
|
3 |
-
|
4 |
-
float: left;
|
5 |
-
width: 48px;
|
6 |
-
height: 48px;
|
7 |
-
text-indent: -9999px;
|
8 |
-
outline:none;
|
9 |
-
}
|
10 |
-
#twitter_social_discount{
|
11 |
-
background: url(../../images/netsol/twitter.png) no-repeat;
|
12 |
-
}
|
13 |
-
#coupon_code{
|
14 |
-
float: left;
|
15 |
-
font-size: 22px;
|
16 |
-
font-weight: bold;
|
17 |
-
margin: 10px;
|
18 |
-
width: 100%;
|
19 |
-
}
|
20 |
.social_loader{background: url(../../images/netsol/social_loader.gif) no-repeat !important;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#netsol_sd_buttons{width:100%; float:left;}
|
2 |
+
#facebook_social_discount, #twitter_social_discount {background: url(../../images/netsol/facebook.png) no-repeat; float: left; width: 48px; height: 48px; text-indent: -9999px; outline:none;}
|
3 |
+
#twitter_social_discount{background: url(../../images/netsol/twitter.png) no-repeat;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
.social_loader{background: url(../../images/netsol/social_loader.gif) no-repeat !important;}
|
5 |
+
|
6 |
+
#netsol_sd_buttons .response{width:100%; float:left; margin:10px 0;}
|
7 |
+
#netsol_sd_buttons .response #coupon_code_text{float: left; font-size: 20px; font-weight: bold; width: 100%;}
|
8 |
+
#netsol_sd_buttons .response .form, #netsol_sd_buttons .response .form label{float: left; width: 100%;}
|
9 |
+
#netsol_sd_buttons .response .form input#sd_email{width: 245px;}
|
10 |
+
#netsol_sd_buttons .response .form button{clear:both; display:block; margin-top:10px;}
|
11 |
+
#netsol_sd_buttons .response .form .sd_message{color: #3399CC; float: left; margin: 5px 0; width: 100%;}
|
12 |
+
#netsol_sd_buttons .response, #netsol_sd_buttons .response .form{display:none;}
|
skin/frontend/base/default/images/netsol/brand/bullet.png
ADDED
Binary file
|
skin/frontend/base/default/images/netsol/brand/bx_loader.gif
ADDED
Binary file
|
skin/frontend/base/default/images/netsol/brand/controls.png
ADDED
Binary file
|
skin/frontend/base/default/images/netsol/brand/loading.gif
ADDED
Binary file
|
skin/frontend/base/default/images/netsol/brand/product_loader.gif
ADDED
Binary file
|
skin/frontend/base/default/images/netsol/brand/small_image.jpg
ADDED
Binary file
|