Version Notes
My STORE extension sorts the products based on user preferences saved,
user will see only he/his preferred range of products.
User Store preferences based on following terms and able to save the user specific preferences.
1. My store tab for the specific user to buy his own preferable products.
2. User can set their product preferences based on the following terms.
- Based on product categories like Men, Women, Kid etc
- Color ranges,
- Price ranges,
- Manufacturer ranges,
- Newly arrived ranges,
- Weight ranges,
- Out of stock
3. Saving the user preferences and showing the same preference ranged products on revisits.
4. Allowing the user to set preferences and filter the products of their preference.
5. User is able to change or update his preferences periodically.
Release Info
Developer | Techinflo |
Extension | Techinflo_Mystore |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/local/Techinflo/MyStoreWidget/Block/Index.php +8 -0
- app/code/local/Techinflo/MyStoreWidget/Block/Mystore_Widget.php +18 -0
- app/code/local/Techinflo/MyStoreWidget/Helper/Data.php +5 -0
- app/code/local/Techinflo/MyStoreWidget/controllers/IndexController.php +22 -0
- app/code/local/Techinflo/MyStoreWidget/etc/config.xml +38 -0
- app/code/local/Techinflo/MyStoreWidget/etc/widget.xml +44 -0
- app/code/local/Techinflo/Mystore/Block/Customer.php +1 -0
- app/code/local/Techinflo/Mystore/Block/Customer/Account/Customer.php +1 -0
- app/code/local/Techinflo/Mystore/Block/Customer/Account/Lists.php +13 -0
- app/code/local/Techinflo/Mystore/Helper/Data.php +32 -0
- app/code/local/Techinflo/Mystore/Model/Resource/Setup.php +26 -0
- app/code/local/Techinflo/Mystore/controllers/AccountpageController.php +1 -0
- app/code/local/Techinflo/Mystore/controllers/IndexController.php +31 -0
- app/code/local/Techinflo/Mystore/controllers/new 2.txt +104 -0
- app/code/local/Techinflo/Mystore/etc/config.xml +60 -0
- app/code/local/Techinflo/Mystore/sql/techinflo_mystore_setup/install-0.0.1.php +67 -0
- app/code/local/Techinflo/MystoreOption/Block/View.php +148 -0
- app/code/local/Techinflo/MystoreOption/Block/View.php.bak +147 -0
- app/code/local/Techinflo/MystoreOption/Model/System/Config/Source/Preferencetype/Values.php +22 -0
- app/code/local/Techinflo/MystoreOption/Model/System/Config/Source/Preferencetype/Values.php.bak +18 -0
- app/code/local/Techinflo/MystoreOption/controllers/AccountController.php +110 -0
- app/code/local/Techinflo/MystoreOption/controllers/IndexController.php +106 -0
- app/code/local/Techinflo/MystoreOption/etc/adminhtml.xml +22 -0
- app/code/local/Techinflo/MystoreOption/etc/adminhtml.xml.bak +22 -0
- app/code/local/Techinflo/MystoreOption/etc/config.xml +65 -0
- app/code/local/Techinflo/MystoreOption/etc/config.xml.bak +58 -0
- app/code/local/Techinflo/MystoreOption/etc/system.xml +58 -0
- app/code/local/Techinflo/MystoreOption/etc/system.xml.bak +59 -0
- app/etc/modules/Techinflo_MyStoreWidget.xml +13 -0
- app/etc/modules/Techinflo_Mystore.xml +10 -0
- app/etc/modules/Techinflo_MystoreOption.xml +9 -0
- package.xml +63 -0
- skin/frontend/default/default/css/mystore/lightbox-form.css +63 -0
- skin/frontend/default/default/css/mystore/prefference.css +43 -0
- skin/frontend/default/default/js/mystore/lightbox-form.js +56 -0
- skin/frontend/default/default/js/mystore/mystore_page.js +41 -0
- skin/frontend/default/default/js/mystore/prefference.js +41 -0
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Techinflo_MyStoreWidget_Block_Index extends Mage_Core_Block_Template{
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
}
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Techinflo_MyStoreWidget_Block_Mystore_Widget
|
3 |
+
extends Mage_Core_Block_Abstract
|
4 |
+
implements Mage_Widget_Block_Interface
|
5 |
+
{
|
6 |
+
|
7 |
+
protected function _toHtml()
|
8 |
+
{
|
9 |
+
$html ='';
|
10 |
+
$html .= 'mystore_widget parameter1 = '.$this->getData('parameter1').'<br/>';
|
11 |
+
$html .= 'mystore_widget parameter2 = '.$this->getData('parameter2').'<br/>';
|
12 |
+
$html .= 'mystore_widget parameter3 = '.$this->getData('parameter3').'<br/>';
|
13 |
+
$html .= 'mystore_widget parameter4 = '.$this->getData('parameter4').'<br/>';
|
14 |
+
$html .= 'mystore_widget parameter5 = '.$this->getData('parameter5').'<br/>';
|
15 |
+
return $html;
|
16 |
+
}
|
17 |
+
|
18 |
+
}
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Techinflo_MyStoreWidget_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
}
|
5 |
+
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Techinflo_MyStoreWidget_IndexController extends Mage_Core_Controller_Front_Action{
|
3 |
+
public function IndexAction() {
|
4 |
+
|
5 |
+
$this->loadLayout();
|
6 |
+
$this->getLayout()->getBlock("head")->setTitle($this->__("Titlename"));
|
7 |
+
$breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
|
8 |
+
$breadcrumbs->addCrumb("home", array(
|
9 |
+
"label" => $this->__("Home Page"),
|
10 |
+
"title" => $this->__("Home Page"),
|
11 |
+
"link" => Mage::getBaseUrl()
|
12 |
+
));
|
13 |
+
|
14 |
+
$breadcrumbs->addCrumb("titlename", array(
|
15 |
+
"label" => $this->__("Titlename"),
|
16 |
+
"title" => $this->__("Titlename")
|
17 |
+
));
|
18 |
+
|
19 |
+
$this->renderLayout();
|
20 |
+
|
21 |
+
}
|
22 |
+
}
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Techinflo_MyStoreWidget>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Techinflo_MyStoreWidget>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<mystorewidget>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Techinflo_MyStoreWidget</module>
|
14 |
+
<frontName>mystorewidget</frontName>
|
15 |
+
</args>
|
16 |
+
</mystorewidget>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<mystorewidget>
|
21 |
+
<file>mystorewidget.xml</file>
|
22 |
+
</mystorewidget>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<global>
|
27 |
+
<helpers>
|
28 |
+
<mystorewidget>
|
29 |
+
<class>Techinflo_MyStoreWidget_Helper</class>
|
30 |
+
</mystorewidget>
|
31 |
+
</helpers>
|
32 |
+
<blocks>
|
33 |
+
<mystorewidget>
|
34 |
+
<class>Techinflo_MyStoreWidget_Block</class>
|
35 |
+
</mystorewidget>
|
36 |
+
</blocks>
|
37 |
+
</global>
|
38 |
+
</config>
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<widgets>
|
3 |
+
<mystorewidget_mystore_widget type="mystorewidget/mystore_widget" translate="name description" module="mystorewidget">
|
4 |
+
<name>My Store Widget</name>
|
5 |
+
<description type="desc">My Store Widget</description>
|
6 |
+
<parameters>
|
7 |
+
<parameter1>
|
8 |
+
<label>parameter 1</label>
|
9 |
+
<visible>1</visible>
|
10 |
+
<required>1</required>
|
11 |
+
<type>text</type>
|
12 |
+
<value>parameter1</value>
|
13 |
+
</parameter1>
|
14 |
+
<parameter2>
|
15 |
+
<label>parameter 2</label>
|
16 |
+
<visible>1</visible>
|
17 |
+
<required>1</required>
|
18 |
+
<type>textarea</type>
|
19 |
+
<value>parameter2</value>
|
20 |
+
</parameter2>
|
21 |
+
<parameter3>
|
22 |
+
<label>parameter 3</label>
|
23 |
+
<visible>1</visible>
|
24 |
+
<required>1</required>
|
25 |
+
<type>select</type>
|
26 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
27 |
+
</parameter3>
|
28 |
+
<parameter4>
|
29 |
+
<label>parameter 4</label>
|
30 |
+
<visible>1</visible>
|
31 |
+
<required>1</required>
|
32 |
+
<type>multiselect</type>
|
33 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
34 |
+
</parameter4>
|
35 |
+
<parameter5>
|
36 |
+
<label>parameter 5</label>
|
37 |
+
<visible>1</visible>
|
38 |
+
<required>1</required>
|
39 |
+
<type>password</type>
|
40 |
+
<value>parameter5</value>
|
41 |
+
</parameter5>
|
42 |
+
</parameters>
|
43 |
+
</mystorewidget_mystore_widget>
|
44 |
+
</widgets>
|
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php
|
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Mystore Block for MyAccount
|
5 |
+
*
|
6 |
+
* @category Techinflo
|
7 |
+
* @package Techinflo_Mystore
|
8 |
+
* @author Techinflo Team
|
9 |
+
*/
|
10 |
+
class Techinflo_Mystore_Block_Customer_Account_Lists extends Techinflo_Mystore_Block_Lists
|
11 |
+
{
|
12 |
+
|
13 |
+
}
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Techinflo_Mystore_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
public function isEnabled()
|
6 |
+
{
|
7 |
+
return Mage::getStoreConfig('techinflo/mystoreoption/active');
|
8 |
+
}
|
9 |
+
|
10 |
+
public function getCategoriesDropdown() {
|
11 |
+
|
12 |
+
$categoriesArray = Mage::getModel('catalog/category')
|
13 |
+
->getCollection()
|
14 |
+
->addAttributeToSelect('name')
|
15 |
+
->addAttributeToSort('path', 'asc')
|
16 |
+
->addFieldToFilter('is_active', array('eq'=>'1'))
|
17 |
+
->load()
|
18 |
+
->toArray();
|
19 |
+
|
20 |
+
|
21 |
+
foreach ($categoriesArray as $categoryId => $category) {
|
22 |
+
if (isset($category['name'])) {
|
23 |
+
$categories[] = array(
|
24 |
+
'label' => $category['name'],
|
25 |
+
'level' =>$category['level'],
|
26 |
+
'value' => $categoryId
|
27 |
+
);
|
28 |
+
}
|
29 |
+
}
|
30 |
+
return $categories;
|
31 |
+
}
|
32 |
+
}
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Techinflo_Mystore extension
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the OSL License
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-license.php
|
11 |
+
*
|
12 |
+
* @category Techinflo
|
13 |
+
* @package Techinflo_CategoryGroup
|
14 |
+
* @copyright Copyright (c) 2014
|
15 |
+
* @license http://opensource.org/licenses/osl-license.php OSL 3.0
|
16 |
+
*/
|
17 |
+
/**
|
18 |
+
* Mystore module install script
|
19 |
+
*
|
20 |
+
* @category Techinflo
|
21 |
+
* @package Techinflo_Mystore
|
22 |
+
* @author Techinflo Team
|
23 |
+
*/
|
24 |
+
class Techinflo_Mystore_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup{
|
25 |
+
|
26 |
+
}
|
@@ -0,0 +1 @@
|
|
|
|
0 |
protected function _getSession() {
|
1 |
return Mage::getSingleton('customer/session');
|
2 |
}
|
3 |
public function preDispatch() {
|
4 |
parent::preDispatch();
|
5 |
if (!Mage::getSingleton('customer/session')->authenticate($this)) {
|
6 |
$this->setFlag('', 'no-dispatch', true);
|
7 |
}
|
8 |
}
|
9 |
public function indexAction() { // landing page
|
10 |
$this->loadLayout();
|
11 |
$this->renderLayout();
|
12 |
}
|
13 |
|
14 |
public function saveprefferenceAction() {
|
15 |
|
16 |
if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
17 |
|
18 |
if($this->getRequest()->isPost()) {
|
19 |
else $price = $this->getRequest()->getPost('price');
|
20 |
$flag = $this->getRequest()->getPost('flag');
|
21 |
$connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
|
22 |
}
|
23 |
}
|
24 |
$this->_redirectReferer();
|
25 |
}
|
26 |
}
|
27 |
}
|
28 |
|
29 |
|
30 |
|
31 |
public function guestprefferenceAction() {
|
32 |
|
33 |
if($this->getRequest()->isPost())
|
34 |
else $price = $this->getRequest()->getPost('price');
|
35 |
$flag = $this->getRequest()->getPost('flag');
|
36 |
$connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
|
37 |
}
|
38 |
}
|
39 |
$this->_redirectReferer();
|
40 |
}
|
1 |
+
<?php
|
2 |
protected function _getSession() {
|
3 |
return Mage::getSingleton('customer/session');
|
4 |
}
|
5 |
public function preDispatch() {
|
6 |
parent::preDispatch();
|
7 |
if (!Mage::getSingleton('customer/session')->authenticate($this)) {
|
8 |
$this->setFlag('', 'no-dispatch', true);
|
9 |
}
|
10 |
}
|
11 |
public function indexAction() { // landing page
|
12 |
$this->loadLayout();
|
13 |
$this->renderLayout();
|
14 |
}
|
15 |
|
16 |
public function saveprefferenceAction() {
|
17 |
|
18 |
if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
19 |
|
20 |
if($this->getRequest()->isPost()) {
|
21 |
else $price = $this->getRequest()->getPost('price');
|
22 |
$flag = $this->getRequest()->getPost('flag');
|
23 |
$connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
|
24 |
}
|
25 |
}
|
26 |
$this->_redirectReferer();
|
27 |
}
|
28 |
}
|
29 |
}
|
30 |
|
31 |
|
32 |
|
33 |
public function guestprefferenceAction() {
|
34 |
|
35 |
if($this->getRequest()->isPost())
|
36 |
else $price = $this->getRequest()->getPost('price');
|
37 |
$flag = $this->getRequest()->getPost('flag');
|
38 |
$connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
|
39 |
}
|
40 |
}
|
41 |
$this->_redirectReferer();
|
42 |
}
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Techinflo_Mystore_IndexController extends Mage_Core_Controller_Front_Action {
|
4 |
+
|
5 |
+
public function saveprefferenceAction() {
|
6 |
+
/*
|
7 |
+
if($this->getRequest()->isPost())
|
8 |
+
{
|
9 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn()):
|
10 |
+
|
11 |
+
$id = $this->helper('customer')->getCustomer()->getId();
|
12 |
+
|
13 |
+
$brand = $this->getRequest()->getPost('brand');
|
14 |
+
$price = $this->getRequest()->getPost('price');
|
15 |
+
$category = $this->getRequest()->getPost('category');
|
16 |
+
$flag = 0;
|
17 |
+
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
|
18 |
+
$read = Mage::getSingleton('core/resource')->getConnection('core_write');
|
19 |
+
if(!flag || $flag == 0){
|
20 |
+
$sql = "INSERT INTO `customer_mystore_prefference` (`customer_id`,`brand`,`price`,`category`,`flag`) VALUES ($id, $brand, $price, $category, $flag)";
|
21 |
+
}
|
22 |
+
$write->query($sql);
|
23 |
+
$read->query($sql);
|
24 |
+
endif;
|
25 |
+
|
26 |
+
}
|
27 |
+
|
28 |
+
Mage::getSingleton('customer/session')->addError(Mage::helper('mystore')->__('Error: Your Preferences not saved'));
|
29 |
+
$this->_redirectReferer();*/
|
30 |
+
}
|
31 |
+
}
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
$email = $this->getRequest()->getPost('email');
|
2 |
+
$brand = $this->getRequest()->getPost('brand');
|
3 |
+
$brands = $this->getRequest()->getPost('brands');
|
4 |
+
$price = $this->getRequest()->getPost('price');
|
5 |
+
$prices = $this->getRequest()->getPost('prices');
|
6 |
+
$category = $this->getRequest()->getPost('category');
|
7 |
+
$categories = $this->getRequest()->getPost('categories');
|
8 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
|
9 |
+
$sql = "INSERT INTO `customer_mystore_prefference` (`customer_email`,`brand`,`category`,`price`,`brands`,`categories`,`prices`) VALUES ('$email','$brand','$category','$price','$brands','$categories','$prices')";
|
10 |
+
$connection->query($sql);
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
if($this->getRequest()->getPost('brand') = 'off')
|
15 |
+
{
|
16 |
+
$brand = 'off';
|
17 |
+
$brands = 'off';
|
18 |
+
}
|
19 |
+
|
20 |
+
else {
|
21 |
+
$brand = $this->getRequest()->getPost('brand');
|
22 |
+
$brands = $this->getRequest()->getPost('brands');
|
23 |
+
UPDATE `customer_mystore_prefference` SET brand =0,category =1,price =0,brands = NULL ,categories =1,prices = NULL WHERE customer_email = 'James@gmail.com'
|
24 |
+
|
25 |
+
|
26 |
+
{
|
27 |
+
|
28 |
+
$email = Mage::getSingleton('customer/session')->getCustomer()->getCustomer_email();
|
29 |
+
|
30 |
+
if($this->getRequest()->isPost())
|
31 |
+
{
|
32 |
+
|
33 |
+
|
34 |
+
$brand = $this->getRequest()->getPost('brand') ;
|
35 |
+
if($brand = '1')
|
36 |
+
{
|
37 |
+
$brands = $this->getRequest()->getPost('brands');
|
38 |
+
}
|
39 |
+
else
|
40 |
+
{
|
41 |
+
$brands = 'NULL';
|
42 |
+
}
|
43 |
+
|
44 |
+
$price = $this->getRequest()->getPost('price');
|
45 |
+
if($price = '1')
|
46 |
+
{
|
47 |
+
$prices = $this->getRequest()->getPost('prices');
|
48 |
+
}
|
49 |
+
else
|
50 |
+
{
|
51 |
+
$prices = 'NULL';
|
52 |
+
}
|
53 |
+
|
54 |
+
$category = $this->getRequest()->getPost('category');
|
55 |
+
if($categories = '1')
|
56 |
+
{
|
57 |
+
$categories = $this->getRequest()->getPost('categories');
|
58 |
+
}
|
59 |
+
else
|
60 |
+
{
|
61 |
+
$categories = 'NULL';
|
62 |
+
}
|
63 |
+
|
64 |
+
//$write = Mage::getSingleton('core/resource')->getConnection('core_write');
|
65 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
|
66 |
+
|
67 |
+
|
68 |
+
$sql = "UPDATE `customer_mystore_prefference` SET brand =$brand,category =$category,price =$price,brands = $brands,categories =$categories,prices = $prices WHERE customer_email = '$email'";
|
69 |
+
|
70 |
+
$connection->query($sql);
|
71 |
+
}
|
72 |
+
|
73 |
+
|
74 |
+
|
75 |
+
|
76 |
+
public function saveprefferenceAction() {
|
77 |
+
|
78 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn())
|
79 |
+
{
|
80 |
+
$email = $this->getRequest()->getPost('email');
|
81 |
+
$brand = $this->getRequest()->getPost('brand');
|
82 |
+
$brands = $this->getRequest()->getPost('brands');
|
83 |
+
$price = $this->getRequest()->getPost('price');
|
84 |
+
$prices = $this->getRequest()->getPost('prices');
|
85 |
+
$category = $this->getRequest()->getPost('category');
|
86 |
+
$categories = $this->getRequest()->getPost('categories');
|
87 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
|
88 |
+
|
89 |
+
|
90 |
+
$sql = "UPDATE `customer_mystore_prefference` SET brand =$brand,category =$category,price =$price,brands = $brands,categories =$categories,prices = $prices WHERE customer_email = '$email'";
|
91 |
+
|
92 |
+
$connection->query($sql);
|
93 |
+
}
|
94 |
+
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
<?php
|
99 |
+
$sql = "SELECT * FROM customer_mystore_prefference WHERE Customer_email='$email'";
|
100 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
|
101 |
+
foreach ($connection->fetchAll($sql) as $arr_row) {
|
102 |
+
echo $arr_row['brand'];
|
103 |
+
}
|
104 |
+
?>
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Techinflo_Mystore>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Techinflo_Mystore>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<global>
|
10 |
+
<resources>
|
11 |
+
<techinflo_mystore_setup>
|
12 |
+
<setup>
|
13 |
+
<module>Techinflo_Mystore</module>
|
14 |
+
<class>Techinflo_Mystore_Model_Resource_Setup</class>
|
15 |
+
</setup>
|
16 |
+
</techinflo_mystore_setup>
|
17 |
+
</resources>
|
18 |
+
<blocks> <!--Block folder-->
|
19 |
+
<techinflo>
|
20 |
+
<class>Techinflo_Mystore_Block</class>
|
21 |
+
</techinflo>
|
22 |
+
</blocks>
|
23 |
+
<helpers>
|
24 |
+
<techinflo>
|
25 |
+
<class>Techinflo_Mystore_Helper</class>
|
26 |
+
</techinflo>
|
27 |
+
</helpers>
|
28 |
+
</global>
|
29 |
+
|
30 |
+
<frontend>
|
31 |
+
<routers>
|
32 |
+
<techinflo>
|
33 |
+
<use>standard</use>
|
34 |
+
<args>
|
35 |
+
<module>Techinflo_Mystore</module>
|
36 |
+
<frontName>mystore</frontName>
|
37 |
+
</args>
|
38 |
+
</techinflo>
|
39 |
+
|
40 |
+
<customer>
|
41 |
+
<args>
|
42 |
+
<modules>
|
43 |
+
<!--name / before: change existing -->
|
44 |
+
<techinflo before="Mage_Customer">Techinflo_Mystore</techinflo>
|
45 |
+
</modules>
|
46 |
+
</args>
|
47 |
+
</customer>
|
48 |
+
</routers>
|
49 |
+
|
50 |
+
<layout>
|
51 |
+
<updates>
|
52 |
+
<techinflo>
|
53 |
+
<!--app\design\frontend\default\default\layout\customer\mystore.xml-->
|
54 |
+
<file>customer/mystore.xml</file>
|
55 |
+
</techinflo>
|
56 |
+
</updates>
|
57 |
+
</layout>
|
58 |
+
|
59 |
+
</frontend>
|
60 |
+
</config>
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Techinflo_Mystore extension
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the OSL License
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-license.php
|
11 |
+
*
|
12 |
+
* @category Techinflo
|
13 |
+
* @package Techinflo_CategoryGroup
|
14 |
+
* @copyright Copyright (c) 2014
|
15 |
+
* @license http://opensource.org/licenses/osl-license.php OSL 3.0
|
16 |
+
*/
|
17 |
+
/**
|
18 |
+
* Mystore module install script
|
19 |
+
*
|
20 |
+
* @category Techinflo
|
21 |
+
* @package Techinflo_Mystore
|
22 |
+
* @author Techinflo Team
|
23 |
+
*/
|
24 |
+
?>
|
25 |
+
<?php
|
26 |
+
$installer = $this;
|
27 |
+
/* @var $installer Mage_Customer_Model_Entity_Setup */
|
28 |
+
|
29 |
+
$installer->startSetup();
|
30 |
+
|
31 |
+
$installer->run("
|
32 |
+
|
33 |
+
/*Table structure for table `customer_mystore_prefference` */
|
34 |
+
|
35 |
+
DROP TABLE IF EXISTS `customer_mystore_prefference`;
|
36 |
+
|
37 |
+
CREATE TABLE `customer_mystore_prefference` (
|
38 |
+
`id` int(25) NOT NULL AUTO_INCREMENT,
|
39 |
+
`customer_email` varchar(255) DEFAULT NULL,
|
40 |
+
`brand` varchar(25) DEFAULT NULL,
|
41 |
+
`category` varchar(25) DEFAULT NULL,
|
42 |
+
`price` varchar(25) DEFAULT NULL,
|
43 |
+
`brands` varchar(255) DEFAULT NULL,
|
44 |
+
`categories` varchar(255) DEFAULT NULL,
|
45 |
+
`prices` varchar(255) DEFAULT NULL,
|
46 |
+
PRIMARY KEY (`id`)
|
47 |
+
) ENGINE=InnoDB AUTO_INCREMENT=108 DEFAULT CHARSET=utf8;
|
48 |
+
|
49 |
+
/*Table structure for table `guest_mystore_prefference` */
|
50 |
+
|
51 |
+
DROP TABLE IF EXISTS `guest_mystore_prefference`;
|
52 |
+
|
53 |
+
CREATE TABLE `guest_mystore_prefference` (
|
54 |
+
`id` int(25) NOT NULL AUTO_INCREMENT,
|
55 |
+
`cookie_name` varchar(255) DEFAULT NULL,
|
56 |
+
`brand` varchar(25) DEFAULT NULL,
|
57 |
+
`category` varchar(25) DEFAULT NULL,
|
58 |
+
`price` varchar(25) DEFAULT NULL,
|
59 |
+
`brands` varchar(255) DEFAULT NULL,
|
60 |
+
`categories` varchar(255) DEFAULT NULL,
|
61 |
+
`prices` varchar(255) DEFAULT NULL,
|
62 |
+
PRIMARY KEY (`id`)
|
63 |
+
) ENGINE=InnoDB AUTO_INCREMENT=96 DEFAULT CHARSET=utf8;
|
64 |
+
|
65 |
+
");
|
66 |
+
|
67 |
+
$installer->endSetup();
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Mystore Extension for User shopping preferences
|
4 |
+
* @category Techinflo
|
5 |
+
* @package Techinflo_MystoreOption
|
6 |
+
* @author Techinflo
|
7 |
+
*/
|
8 |
+
class Techinflollp_MystoreOption_Block_View extends Mage_Core_Block_Template
|
9 |
+
{
|
10 |
+
|
11 |
+
public function __construct()
|
12 |
+
{
|
13 |
+
|
14 |
+
}
|
15 |
+
public function getOverlayContent($t1){
|
16 |
+
$enable = $this->getIsActive();
|
17 |
+
$content_mode = $this->getContentMode();
|
18 |
+
$static_block_id = $this->getStaticBlockId();
|
19 |
+
$cms_page_id = $this->getCmsPageId();
|
20 |
+
$category_dentifire = $this->getCategoryIdentifire();
|
21 |
+
$product_identifire = $this->getProductIdentifire();
|
22 |
+
if(!$enable) return false;
|
23 |
+
if(!$t1){
|
24 |
+
$t1 = "default";
|
25 |
+
}
|
26 |
+
if($content_mode == 'static'){
|
27 |
+
|
28 |
+
if($t1 == "category" && $category_dentifire ){
|
29 |
+
return $this->getLayout()->createBlock('cms/block')->setBlockId($category_dentifire)->toHtml();
|
30 |
+
}
|
31 |
+
elseif($t1 == "product" && $product_identifire ){
|
32 |
+
return $this->getLayout()->createBlock('cms/block')->setBlockId($product_identifire)->toHtml();
|
33 |
+
}
|
34 |
+
else{
|
35 |
+
if($static_block_id){
|
36 |
+
return $this->getLayout()->createBlock('cms/block')->setBlockId($static_block_id)->toHtml();
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
elseif($content_mode == 'cms') {
|
41 |
+
if($t1 == "category" && $category_dentifire){
|
42 |
+
return Mage::getModel('cms/page')->load($category_dentifire,'identifier')->getContent();
|
43 |
+
}
|
44 |
+
elseif($t1 == "product" && $product_identifire){
|
45 |
+
return Mage::getModel('cms/page')->load($product_identifire,'identifier')->getContent();
|
46 |
+
}
|
47 |
+
else{
|
48 |
+
if($cms_page_id){
|
49 |
+
return Mage::getModel('cms/page')->load($cms_page_id,'identifier')->getContent();
|
50 |
+
}
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
}
|
55 |
+
public function getIsActive(){
|
56 |
+
if(Mage::getStoreConfig("techinflo/general/active"))
|
57 |
+
return true;
|
58 |
+
else
|
59 |
+
return false;
|
60 |
+
}
|
61 |
+
public function getContentMode(){
|
62 |
+
if(Mage::getStoreConfig("techinflo_mystoreoption/dropdown_overlay_content"))
|
63 |
+
return Mage::getStoreConfig("techinflo_mystoreoption/dropdown_overlay_content");
|
64 |
+
else
|
65 |
+
return "";
|
66 |
+
}
|
67 |
+
public function getStaticBlockId(){
|
68 |
+
if(Mage::getStoreConfig("techinflo_mystoreoption/dependant_text_field_staticblock"))
|
69 |
+
return Mage::getStoreConfig("techinflo_mystoreoption/dependant_text_field_staticblock");
|
70 |
+
else
|
71 |
+
return '';
|
72 |
+
}
|
73 |
+
public function getCmsPageId(){
|
74 |
+
if(Mage::getStoreConfig("techinflo_mystoreoption/dependant_text_field_cmspage"))
|
75 |
+
return Mage::getStoreConfig("techinflo_mystoreoption/dependant_text_field_cmspage");
|
76 |
+
else
|
77 |
+
return '';
|
78 |
+
}
|
79 |
+
public function getOverlaySizeIn(){
|
80 |
+
return Mage::getStoreConfig("techinflo_mystoreoption/dropdown");
|
81 |
+
}
|
82 |
+
public function getOverlayHeight(){
|
83 |
+
if($this->getOverlaySizeIn() == "pixel"){
|
84 |
+
if(Mage::getStoreConfig("techinflo_mystoreoption/text_field_height"))
|
85 |
+
return Mage::getStoreConfig("techinflo_mystoreoption/text_field_height").'px';
|
86 |
+
else
|
87 |
+
return "auto";
|
88 |
+
}
|
89 |
+
elseif($this->getOverlaySizeIn() == "percent"){
|
90 |
+
if(Mage::getStoreConfig("techinflo_mystoreoption/text_field_height"))
|
91 |
+
return Mage::getStoreConfig("techinflo_mystoreoption/text_field_height").'%';
|
92 |
+
else
|
93 |
+
return "auto";
|
94 |
+
}
|
95 |
+
}
|
96 |
+
public function getOverlayWeight(){
|
97 |
+
if($this->getOverlaySizeIn() == "pixel"){
|
98 |
+
if(Mage::getStoreConfig("techinflo_mystoreoption/text_field_width"))
|
99 |
+
return Mage::getStoreConfig("techinflo_mystoreoption/text_field_width").'px';
|
100 |
+
else
|
101 |
+
return "auto";
|
102 |
+
}
|
103 |
+
elseif($this->getOverlaySizeIn() == "percent"){
|
104 |
+
if(Mage::getStoreConfig("techinflo_mystoreoption/text_field_width"))
|
105 |
+
return Mage::getStoreConfig("techinflo_mystoreoption/text_field_width").'%';
|
106 |
+
else
|
107 |
+
return "auto";
|
108 |
+
}
|
109 |
+
}
|
110 |
+
public function getOverlayTitle(){
|
111 |
+
if(Mage::getStoreConfig("techinflo_mystoreoption/boolean")) {
|
112 |
+
return Mage::getStoreConfig("techinflo_mystoreoption/dependant_text_field");
|
113 |
+
}
|
114 |
+
else {
|
115 |
+
return false;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
public function getOverlayPages(){
|
119 |
+
$pages = array();
|
120 |
+
$pages = explode(',',Mage::getStoreConfig("techinflo_mystoreoption/multiple_dropdown"));
|
121 |
+
return $pages;
|
122 |
+
}
|
123 |
+
public function getCategoryIdentifire(){
|
124 |
+
if(Mage::getStoreConfig("techinflo_mystoreoption/text_field_category")) {
|
125 |
+
return Mage::getStoreConfig("techinflo_mystoreoption/text_field_category");
|
126 |
+
}
|
127 |
+
else {
|
128 |
+
return false;
|
129 |
+
}
|
130 |
+
}
|
131 |
+
public function getProductIdentifire(){
|
132 |
+
if(Mage::getStoreConfig("techinflo_mystoreoption/text_field_product")) {
|
133 |
+
return Mage::getStoreConfig("techinflo_mystoreoption/text_field_product");
|
134 |
+
}
|
135 |
+
else {
|
136 |
+
return false;
|
137 |
+
}
|
138 |
+
}
|
139 |
+
public function getCookieExpireTime(){
|
140 |
+
if(Mage::getStoreConfig("techinflo_mystoreoption/text_field_cookie_time")) {
|
141 |
+
return Mage::getStoreConfig("techinflo_mystoreoption/text_field_cookie_time");
|
142 |
+
}
|
143 |
+
else {
|
144 |
+
return false;
|
145 |
+
}
|
146 |
+
}
|
147 |
+
}
|
148 |
+
?>
|
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @category Techinflo
|
4 |
+
* @package Techinflo NewsletterOption
|
5 |
+
* @author <Techinflo Team>
|
6 |
+
*/
|
7 |
+
class Techinflollp_NewsletterOption_Block_View extends Mage_Core_Block_Template
|
8 |
+
{
|
9 |
+
|
10 |
+
public function __construct()
|
11 |
+
{
|
12 |
+
|
13 |
+
}
|
14 |
+
public function getOverlayContent($t1){
|
15 |
+
$enable = $this->getIsActive();
|
16 |
+
$content_mode = $this->getContentMode();
|
17 |
+
$static_block_id = $this->getStaticBlockId();
|
18 |
+
$cms_page_id = $this->getCmsPageId();
|
19 |
+
$category_dentifire = $this->getCategoryIdentifire();
|
20 |
+
$product_identifire = $this->getProductIdentifire();
|
21 |
+
if(!$enable) return false;
|
22 |
+
if(!$t1){
|
23 |
+
$t1 = "default";
|
24 |
+
}
|
25 |
+
if($content_mode == 'static'){
|
26 |
+
|
27 |
+
if($t1 == "category" && $category_dentifire ){
|
28 |
+
return $this->getLayout()->createBlock('cms/block')->setBlockId($category_dentifire)->toHtml();
|
29 |
+
}
|
30 |
+
elseif($t1 == "product" && $product_identifire ){
|
31 |
+
return $this->getLayout()->createBlock('cms/block')->setBlockId($product_identifire)->toHtml();
|
32 |
+
}
|
33 |
+
else{
|
34 |
+
if($static_block_id){
|
35 |
+
return $this->getLayout()->createBlock('cms/block')->setBlockId($static_block_id)->toHtml();
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
elseif($content_mode == 'cms') {
|
40 |
+
if($t1 == "category" && $category_dentifire){
|
41 |
+
return Mage::getModel('cms/page')->load($category_dentifire,'identifier')->getContent();
|
42 |
+
}
|
43 |
+
elseif($t1 == "product" && $product_identifire){
|
44 |
+
return Mage::getModel('cms/page')->load($product_identifire,'identifier')->getContent();
|
45 |
+
}
|
46 |
+
else{
|
47 |
+
if($cms_page_id){
|
48 |
+
return Mage::getModel('cms/page')->load($cms_page_id,'identifier')->getContent();
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
}
|
54 |
+
public function getIsActive(){
|
55 |
+
if(Mage::getStoreConfig("techinflo/general/active"))
|
56 |
+
return true;
|
57 |
+
else
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
public function getContentMode(){
|
61 |
+
if(Mage::getStoreConfig("techinflollp/newsletteroption/dropdown_overlay_content"))
|
62 |
+
return Mage::getStoreConfig("techinflollp/newsletteroption/dropdown_overlay_content");
|
63 |
+
else
|
64 |
+
return "";
|
65 |
+
}
|
66 |
+
public function getStaticBlockId(){
|
67 |
+
if(Mage::getStoreConfig("techinflollp/newsletteroption/dependant_text_field_staticblock"))
|
68 |
+
return Mage::getStoreConfig("techinflollp/newsletteroption/dependant_text_field_staticblock");
|
69 |
+
else
|
70 |
+
return '';
|
71 |
+
}
|
72 |
+
public function getCmsPageId(){
|
73 |
+
if(Mage::getStoreConfig("techinflollp/newsletteroption/dependant_text_field_cmspage"))
|
74 |
+
return Mage::getStoreConfig("techinflollp/newsletteroption/dependant_text_field_cmspage");
|
75 |
+
else
|
76 |
+
return '';
|
77 |
+
}
|
78 |
+
public function getOverlaySizeIn(){
|
79 |
+
return Mage::getStoreConfig("techinflollp/newsletteroption/dropdown");
|
80 |
+
}
|
81 |
+
public function getOverlayHeight(){
|
82 |
+
if($this->getOverlaySizeIn() == "pixel"){
|
83 |
+
if(Mage::getStoreConfig("techinflollp/newsletteroption/text_field_height"))
|
84 |
+
return Mage::getStoreConfig("techinflollp/newsletteroption/text_field_height").'px';
|
85 |
+
else
|
86 |
+
return "auto";
|
87 |
+
}
|
88 |
+
elseif($this->getOverlaySizeIn() == "percent"){
|
89 |
+
if(Mage::getStoreConfig("techinflollp/newsletteroption/text_field_height"))
|
90 |
+
return Mage::getStoreConfig("techinflollp/newsletteroption/text_field_height").'%';
|
91 |
+
else
|
92 |
+
return "auto";
|
93 |
+
}
|
94 |
+
}
|
95 |
+
public function getOverlayWeight(){
|
96 |
+
if($this->getOverlaySizeIn() == "pixel"){
|
97 |
+
if(Mage::getStoreConfig("techinflollp/newsletteroption/text_field_width"))
|
98 |
+
return Mage::getStoreConfig("techinflollp/newsletteroption/text_field_width").'px';
|
99 |
+
else
|
100 |
+
return "auto";
|
101 |
+
}
|
102 |
+
elseif($this->getOverlaySizeIn() == "percent"){
|
103 |
+
if(Mage::getStoreConfig("techinflollp/newsletteroption/text_field_width"))
|
104 |
+
return Mage::getStoreConfig("techinflollp/newsletteroption/text_field_width").'%';
|
105 |
+
else
|
106 |
+
return "auto";
|
107 |
+
}
|
108 |
+
}
|
109 |
+
public function getOverlayTitle(){
|
110 |
+
if(Mage::getStoreConfig("techinflollp/newsletteroption/boolean")) {
|
111 |
+
return Mage::getStoreConfig("techinflollp/newsletteroption/dependant_text_field");
|
112 |
+
}
|
113 |
+
else {
|
114 |
+
return false;
|
115 |
+
}
|
116 |
+
}
|
117 |
+
public function getOverlayPages(){
|
118 |
+
$pages = array();
|
119 |
+
$pages = explode(',',Mage::getStoreConfig("techinflollp/newsletteroption/multiple_dropdown"));
|
120 |
+
return $pages;
|
121 |
+
}
|
122 |
+
public function getCategoryIdentifire(){
|
123 |
+
if(Mage::getStoreConfig("techinflollp/newsletteroption/text_field_category")) {
|
124 |
+
return Mage::getStoreConfig("techinflollp/newsletteroption/text_field_category");
|
125 |
+
}
|
126 |
+
else {
|
127 |
+
return false;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
public function getProductIdentifire(){
|
131 |
+
if(Mage::getStoreConfig("techinflollp/newsletteroption/text_field_product")) {
|
132 |
+
return Mage::getStoreConfig("techinflollp/newsletteroption/text_field_product");
|
133 |
+
}
|
134 |
+
else {
|
135 |
+
return false;
|
136 |
+
}
|
137 |
+
}
|
138 |
+
public function getCookieExpireTime(){
|
139 |
+
if(Mage::getStoreConfig("techinflollp/newsletteroption/text_field_cookie_time")) {
|
140 |
+
return Mage::getStoreConfig("techinflollp/newsletteroption/text_field_cookie_time");
|
141 |
+
}
|
142 |
+
else {
|
143 |
+
return false;
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
147 |
+
?>
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Techinflo_MystoreOption_Model_System_Config_Source_Preferencetype_Values
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
return array(
|
8 |
+
array(
|
9 |
+
'value' => 'brand',
|
10 |
+
'label' => 'Brand',
|
11 |
+
),
|
12 |
+
array(
|
13 |
+
'value' => 'price',
|
14 |
+
'label' => 'Price',
|
15 |
+
),
|
16 |
+
array(
|
17 |
+
'value' => 'category',
|
18 |
+
'label' => 'Category',
|
19 |
+
),
|
20 |
+
);
|
21 |
+
}
|
22 |
+
}
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Techinflo_Overlay_Model_System_Config_Source_Overlaysize_Values
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
return array(
|
8 |
+
array(
|
9 |
+
'value' => 'Male/Female Type',
|
10 |
+
'label' => 'Male/Female Type',
|
11 |
+
),
|
12 |
+
array(
|
13 |
+
'value' => 'Category List Type',
|
14 |
+
'label' => 'Category List Type',
|
15 |
+
),
|
16 |
+
);
|
17 |
+
}
|
18 |
+
}
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Customer account controller
|
4 |
+
*
|
5 |
+
* @category Mage
|
6 |
+
* @package Mage_Customer
|
7 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
8 |
+
*/
|
9 |
+
|
10 |
+
|
11 |
+
require_once 'Mage/Customer/controllers/AccountController.php';
|
12 |
+
|
13 |
+
class Techinflo_MystoreOption_AccountController extends Mage_Customer_AccountController
|
14 |
+
{
|
15 |
+
public function createPostAction(){
|
16 |
+
|
17 |
+
if($this->getRequest()->isPost())
|
18 |
+
{
|
19 |
+
$email = $this->getRequest()->getPost('email');
|
20 |
+
|
21 |
+
if(!$this->getRequest()->getPost('brand')) $brand = 'off';
|
22 |
+
else $brand = $this->getRequest()->getPost('brand');
|
23 |
+
|
24 |
+
if(!$this->getRequest()->getPost('price')) $price = 'off';
|
25 |
+
else $price = $this->getRequest()->getPost('price');
|
26 |
+
|
27 |
+
if(!$this->getRequest()->getPost('category')) $category = 'off';
|
28 |
+
else $category = $this->getRequest()->getPost('category');
|
29 |
+
|
30 |
+
$flag = $this->getRequest()->getPost('flag');
|
31 |
+
|
32 |
+
$brands = $this->getRequest()->getPost('brands');
|
33 |
+
$prices = $this->getRequest()->getPost('prices');
|
34 |
+
$categories = $this->getRequest()->getPost('categories');
|
35 |
+
|
36 |
+
$brandstr = implode(',', $brands );
|
37 |
+
$pricestr = implode(',', $prices );
|
38 |
+
$categorystr = implode(',', $categories );
|
39 |
+
|
40 |
+
$connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
|
41 |
+
|
42 |
+
//$sql_query = "DELETE FROM `customer_mystore_prefference` WHERE customer_email = '$email'";
|
43 |
+
|
44 |
+
//$connectionWrite->query($sql_query);
|
45 |
+
|
46 |
+
$table = $connectionWrite->getTableName('customer_mystore_prefference');
|
47 |
+
|
48 |
+
$connectionWrite->beginTransaction();
|
49 |
+
$data = array();
|
50 |
+
$data['customer_email']= $email;
|
51 |
+
$data['brand']= $brand;
|
52 |
+
$data['price']= $price;
|
53 |
+
$data['category']= $category;
|
54 |
+
$data['brands']= $brandstr;
|
55 |
+
$data['prices']= $pricestr;
|
56 |
+
$data['categories']= $categorystr;
|
57 |
+
$connectionWrite->insert($table, $data);
|
58 |
+
$connectionWrite->commit();
|
59 |
+
|
60 |
+
if(!$connectionWrite->commit())
|
61 |
+
|
62 |
+
exit(0);
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
|
67 |
+
/** @var $session Mage_Customer_Model_Session */
|
68 |
+
$session = $this->_getSession();
|
69 |
+
if ($session->isLoggedIn()) {
|
70 |
+
$this->_redirect('*/*/');
|
71 |
+
return;
|
72 |
+
}
|
73 |
+
$session->setEscapeMessages(true); // prevent XSS injection in user input
|
74 |
+
if (!$this->getRequest()->isPost()) {
|
75 |
+
$errUrl = $this->_getUrl('*/*/create', array('_secure' => true));
|
76 |
+
$this->_redirectError($errUrl);
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
|
80 |
+
$customer = $this->_getCustomer();
|
81 |
+
|
82 |
+
try {
|
83 |
+
$errors = $this->_getCustomerErrors($customer);
|
84 |
+
|
85 |
+
if (empty($errors)) {
|
86 |
+
$customer->save();
|
87 |
+
$this->_dispatchRegisterSuccess($customer);
|
88 |
+
$this->_successProcessRegistration($customer);
|
89 |
+
return;
|
90 |
+
} else {
|
91 |
+
$this->_addSessionError($errors);
|
92 |
+
}
|
93 |
+
} catch (Mage_Core_Exception $e) {
|
94 |
+
$session->setCustomerFormData($this->getRequest()->getPost());
|
95 |
+
if ($e->getCode() === Mage_Customer_Model_Customer::EXCEPTION_EMAIL_EXISTS) {
|
96 |
+
$url = $this->_getUrl('customer/account/forgotpassword');
|
97 |
+
$message = $this->__('There is already an account with this email address. If you are sure that it is your email address, <a href="%s">click here</a> to get your password and access your account.', $url);
|
98 |
+
$session->setEscapeMessages(false);
|
99 |
+
} else {
|
100 |
+
$message = $e->getMessage();
|
101 |
+
}
|
102 |
+
$session->addError($message);
|
103 |
+
} catch (Exception $e) {
|
104 |
+
$session->setCustomerFormData($this->getRequest()->getPost())
|
105 |
+
->addException($e, $this->__('Cannot save the customer.'));
|
106 |
+
}
|
107 |
+
$errUrl = $this->_getUrl('*/*/create', array('_secure' => true));
|
108 |
+
$this->_redirectError($errUrl);
|
109 |
+
}
|
110 |
+
}
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Techinflo_MystoreOption_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
$this->loadLayout();
|
7 |
+
$this->renderLayout();
|
8 |
+
}
|
9 |
+
|
10 |
+
public function guestprefferenceAction() {
|
11 |
+
|
12 |
+
if($this->getRequest()->isPost())
|
13 |
+
{
|
14 |
+
$random = mt_rand(1, 999);
|
15 |
+
$variable = 'Guest';
|
16 |
+
$cookie_name = $variable . '' . $random ;
|
17 |
+
|
18 |
+
$user = "User";
|
19 |
+
$value = $cookie_name;
|
20 |
+
$expireinhrs = Mage::getStoreConfig('techinflo/mystoreoption/cookietime');
|
21 |
+
$expireinsec = $expireinhrs * 60 * 60;
|
22 |
+
$expire = time() +$expireinsec;
|
23 |
+
setcookie($user, $value, $expire, '/');
|
24 |
+
|
25 |
+
if(!$this->getRequest()->getPost('brand')) $brand = 'off';
|
26 |
+
else $brand = $this->getRequest()->getPost('brand');
|
27 |
+
|
28 |
+
if(!$this->getRequest()->getPost('price')) $price = 'off';
|
29 |
+
else $price = $this->getRequest()->getPost('price');
|
30 |
+
|
31 |
+
if(!$this->getRequest()->getPost('category')) $category = 'off';
|
32 |
+
else $category = $this->getRequest()->getPost('category');
|
33 |
+
|
34 |
+
$flag = $this->getRequest()->getPost('flag');
|
35 |
+
|
36 |
+
$brands = $this->getRequest()->getPost('brands');
|
37 |
+
$prices = $this->getRequest()->getPost('prices');
|
38 |
+
$categories = $this->getRequest()->getPost('categories');
|
39 |
+
|
40 |
+
$brandstr = implode(',', $brands );
|
41 |
+
$pricestr = implode(',', $prices );
|
42 |
+
$categorystr = implode(',', $categories );
|
43 |
+
|
44 |
+
$connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
|
45 |
+
|
46 |
+
$table = $connectionWrite->getTableName('guest_mystore_prefference');
|
47 |
+
|
48 |
+
$connectionWrite->beginTransaction();
|
49 |
+
$data = array();
|
50 |
+
$data['cookie_name']= $value;
|
51 |
+
$data['brand']= $brand;
|
52 |
+
$data['price']= $price;
|
53 |
+
$data['category']= $category;
|
54 |
+
$data['brands']= $brandstr;
|
55 |
+
$data['prices']= $pricestr;
|
56 |
+
$data['categories']= $categorystr;
|
57 |
+
$connectionWrite->insert($table, $data);
|
58 |
+
$connectionWrite->commit();
|
59 |
+
|
60 |
+
if($connectionWrite->commit())
|
61 |
+
Mage::getSingleton('customer/session')->addSuccess(Mage::helper('mystore')->__('The Preferences are saved successfully'));
|
62 |
+
}
|
63 |
+
else {
|
64 |
+
Mage::getSingleton('customer/session')->addError(Mage::helper('mystore')->__('Error: Your Preferences are not saved'));
|
65 |
+
}
|
66 |
+
$this->_redirectReferer();
|
67 |
+
}
|
68 |
+
|
69 |
+
public function registersaveprefferenceAction() {
|
70 |
+
|
71 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
72 |
+
|
73 |
+
$email = Mage::getSingleton('customer/session')->getCustomer()->getEmail();
|
74 |
+
|
75 |
+
if($this->getRequest()->isPost())
|
76 |
+
{
|
77 |
+
|
78 |
+
$brand = $this->getRequest()->getPost('brand');
|
79 |
+
$brands = $this->getRequest()->getPost('brands');
|
80 |
+
$price = $this->getRequest()->getPost('price');
|
81 |
+
$prices = $this->getRequest()->getPost('pricessss');
|
82 |
+
$category = $this->getRequest()->getPost('category');
|
83 |
+
$categories = $this->getRequest()->getPost('categories');
|
84 |
+
|
85 |
+
$resource = Mage::getSingleton('core/resource');
|
86 |
+
$connection = $resource->getConnection('core_write');
|
87 |
+
$table = $resource->getTableName('customer_mystore_prefference');
|
88 |
+
|
89 |
+
$sql = "UPDATE `customer_mystore_prefference` SET brand ='$brand',category ='$category',price ='$price',brands = '$brands',categories ='$categories',prices = '$prices' WHERE customer_email = '$email '";
|
90 |
+
|
91 |
+
$connection->query($sql);
|
92 |
+
}
|
93 |
+
}
|
94 |
+
//Mage::getSingleton('customer/session')->addSuccess(Mage::helper('mystore')->__('The Preferences are saved successfully'));
|
95 |
+
//$this->_redirectReferer();
|
96 |
+
|
97 |
+
|
98 |
+
|
99 |
+
else { Mage::getSingleton('customer/session')->addError(Mage::helper('mystore')->__('Error: Your Preferences are not saved'));
|
100 |
+
$this->_redirectReferer();
|
101 |
+
}
|
102 |
+
|
103 |
+
}
|
104 |
+
|
105 |
+
}
|
106 |
+
?>
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<system>
|
8 |
+
<children>
|
9 |
+
<config>
|
10 |
+
<children>
|
11 |
+
<techinflo>
|
12 |
+
<title>Tab #1</title> <!-- Used in resources tree -->
|
13 |
+
</techinflo>
|
14 |
+
</children>
|
15 |
+
</config>
|
16 |
+
</children>
|
17 |
+
</system>
|
18 |
+
</children>
|
19 |
+
</admin>
|
20 |
+
</resources>
|
21 |
+
</acl>
|
22 |
+
</config>
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<system>
|
8 |
+
<children>
|
9 |
+
<config>
|
10 |
+
<children>
|
11 |
+
<techinflo>
|
12 |
+
<title>Tab #1</title> <!-- Used in resources tree -->
|
13 |
+
</techinflo>
|
14 |
+
</children>
|
15 |
+
</config>
|
16 |
+
</children>
|
17 |
+
</system>
|
18 |
+
</children>
|
19 |
+
</admin>
|
20 |
+
</resources>
|
21 |
+
</acl>
|
22 |
+
</config>
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Techinflo_MystoreOption>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Techinflo_MystoreOption>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<models>
|
10 |
+
<techinflo_mystoreoption>
|
11 |
+
<class>Techinflo_MystoreOption_Model</class>
|
12 |
+
</techinflo_mystoreoption>
|
13 |
+
</models>
|
14 |
+
<blocks>
|
15 |
+
<techinflo_mystoreoption>
|
16 |
+
<class>Techinflo_MystoreOption_Block</class>
|
17 |
+
</techinflo_mystoreoption>
|
18 |
+
</blocks>
|
19 |
+
</global>
|
20 |
+
<frontend>
|
21 |
+
<routers>
|
22 |
+
<mystoreoption>
|
23 |
+
<use>standard</use>
|
24 |
+
<args>
|
25 |
+
<module>Techinflo_MystoreOption</module>
|
26 |
+
<frontName>MystoreOption</frontName>
|
27 |
+
</args>
|
28 |
+
</mystoreoption>
|
29 |
+
<customer>
|
30 |
+
<args>
|
31 |
+
<modules>
|
32 |
+
<techinflo_mystoreoption before="Mage_Customer">Techinflo_MystoreOption</techinflo_mystoreoption>
|
33 |
+
</modules>
|
34 |
+
</args>
|
35 |
+
</customer>
|
36 |
+
</routers>
|
37 |
+
<translate>
|
38 |
+
<modules>
|
39 |
+
<Techinflo_MystoreOption>
|
40 |
+
<files>
|
41 |
+
<default>Techinflo_MystoreOption.csv</default>
|
42 |
+
</files>
|
43 |
+
</Techinflo_MystoreOption>
|
44 |
+
</modules>
|
45 |
+
</translate>
|
46 |
+
<layout>
|
47 |
+
<updates>
|
48 |
+
<mystoreoption>
|
49 |
+
<file>mystoreoption.xml</file>
|
50 |
+
</mystoreoption>
|
51 |
+
</updates>
|
52 |
+
</layout>
|
53 |
+
</frontend>
|
54 |
+
<default>
|
55 |
+
<tab1>
|
56 |
+
<general>
|
57 |
+
<active>0</active>
|
58 |
+
<dropdown>pixel</dropdown>
|
59 |
+
<multiple_dropdown>home</multiple_dropdown>
|
60 |
+
<boolean>1</boolean>
|
61 |
+
<dependant_text_field>Default value</dependant_text_field>
|
62 |
+
</general>
|
63 |
+
</tab1>
|
64 |
+
</default>
|
65 |
+
</config>
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Techinflollp_NewsletterOption>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Techinflollp_NewsletterOption>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<models>
|
10 |
+
<techinflollp_newsletteroption>
|
11 |
+
<class>Techinflollp_NewsletterOption_Model</class>
|
12 |
+
</techinflollp_newsletteroption>
|
13 |
+
</models>
|
14 |
+
<blocks>
|
15 |
+
<techinflollp_newsletteroption>
|
16 |
+
<class>Techinflollp_NewsletterOption_Block</class>
|
17 |
+
</techinflollp_newsletteroption>
|
18 |
+
</blocks>
|
19 |
+
</global>
|
20 |
+
<frontend>
|
21 |
+
<routers>
|
22 |
+
<overlay>
|
23 |
+
<use>standard</use>
|
24 |
+
<args>
|
25 |
+
<module>Techinflollp_NewsletterOption</module>
|
26 |
+
<frontName>NewsletterOption</frontName>
|
27 |
+
</args>
|
28 |
+
</overlay>
|
29 |
+
</routers>
|
30 |
+
<translate>
|
31 |
+
<modules>
|
32 |
+
<Techinflollp_NewsletterOption>
|
33 |
+
<files>
|
34 |
+
<default>Techinflollp_NewsletterOption.csv</default>
|
35 |
+
</files>
|
36 |
+
</Techinflollp_NewsletterOption>
|
37 |
+
</modules>
|
38 |
+
</translate>
|
39 |
+
<layout>
|
40 |
+
<updates>
|
41 |
+
<newsletteroption>
|
42 |
+
<file>newsletteroption.xml</file>
|
43 |
+
</newsletteroption>
|
44 |
+
</updates>
|
45 |
+
</layout>
|
46 |
+
</frontend>
|
47 |
+
<default>
|
48 |
+
<tab1>
|
49 |
+
<general>
|
50 |
+
<active>0</active>
|
51 |
+
<dropdown>pixel</dropdown>
|
52 |
+
<multiple_dropdown>home</multiple_dropdown>
|
53 |
+
<boolean>1</boolean>
|
54 |
+
<dependant_text_field>Default value</dependant_text_field>
|
55 |
+
</general>
|
56 |
+
</tab1>
|
57 |
+
</default>
|
58 |
+
</config>
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<myconf translate="label">
|
5 |
+
<label>Techinflo</label>
|
6 |
+
<sort_order>180</sort_order>
|
7 |
+
</myconf>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<techinflo translate="label" module="adminhtml">
|
11 |
+
<label>My Store</label>
|
12 |
+
<tab>myconf</tab>
|
13 |
+
<sort_order>20</sort_order>
|
14 |
+
<show_in_default>1</show_in_default>
|
15 |
+
<show_in_website>1</show_in_website>
|
16 |
+
<show_in_store>1</show_in_store>
|
17 |
+
<groups>
|
18 |
+
<mystoreoption translate="label comment">
|
19 |
+
<label>My Store Configuration</label>
|
20 |
+
<sort_order>0</sort_order>
|
21 |
+
<show_in_default>1</show_in_default>
|
22 |
+
<show_in_website>1</show_in_website>
|
23 |
+
<show_in_store>1</show_in_store>
|
24 |
+
<fields>
|
25 |
+
<active translate="label comment">
|
26 |
+
<label>Enable/Disable</label>
|
27 |
+
<comment>To Enable or Disable the extension</comment>
|
28 |
+
<frontend_type>select</frontend_type>
|
29 |
+
<sort_order>1</sort_order>
|
30 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
31 |
+
<show_in_default>1</show_in_default>
|
32 |
+
<show_in_website>1</show_in_website>
|
33 |
+
<show_in_store>1</show_in_store>
|
34 |
+
</active>
|
35 |
+
<!--updropdown translate="label comment">
|
36 |
+
<label>User Preferences</label>
|
37 |
+
<frontend_type>multiselect</frontend_type>
|
38 |
+
<source_model>techinflo_mystoreoption/system_config_source_preferencetype_values</source_model>
|
39 |
+
<sort_order>5</sort_order>
|
40 |
+
<show_in_default>1</show_in_default>
|
41 |
+
<show_in_website>1</show_in_website>
|
42 |
+
<show_in_store>1</show_in_store>
|
43 |
+
</updropdown-->
|
44 |
+
<cookietime translate="label comment">
|
45 |
+
<label>Cookie Expire Time</label>
|
46 |
+
<comment>Note: Please enter expire time in hours</comment>
|
47 |
+
<frontend_type>text</frontend_type>
|
48 |
+
<sort_order>7</sort_order>
|
49 |
+
<show_in_default>1</show_in_default>
|
50 |
+
<show_in_website>1</show_in_website>
|
51 |
+
<show_in_store>1</show_in_store>
|
52 |
+
</cookietime>
|
53 |
+
</fields>
|
54 |
+
</mystoreoption>
|
55 |
+
</groups>
|
56 |
+
</techinflo>
|
57 |
+
</sections>
|
58 |
+
</config>
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<myconf translate="label">
|
5 |
+
<label>Techinflollp</label>
|
6 |
+
<sort_order>180</sort_order>
|
7 |
+
</myconf>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<techinflollp translate="label" module="adminhtml">
|
11 |
+
<label>Newsletter Options</label>
|
12 |
+
<tab>myconf</tab>
|
13 |
+
<sort_order>20</sort_order>
|
14 |
+
<show_in_default>1</show_in_default>
|
15 |
+
<show_in_website>1</show_in_website>
|
16 |
+
<show_in_store>1</show_in_store>
|
17 |
+
<groups>
|
18 |
+
<!--<general translate="label comment">
|
19 |
+
<label>General</label>
|
20 |
+
<sort_order>50</sort_order>
|
21 |
+
<show_in_default>1</show_in_default>
|
22 |
+
<show_in_website>1</show_in_website>
|
23 |
+
<show_in_store>1</show_in_store>
|
24 |
+
<fields>
|
25 |
+
<active translate="label comment">
|
26 |
+
<label>Enable/Disable</label>
|
27 |
+
<frontend_type>select</frontend_type>
|
28 |
+
<sort_order>54</sort_order>
|
29 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
30 |
+
<show_in_default>1</show_in_default>
|
31 |
+
<show_in_website>1</show_in_website>
|
32 |
+
<show_in_store>1</show_in_store>
|
33 |
+
</active>
|
34 |
+
</fields>
|
35 |
+
</general> -->
|
36 |
+
<newsletteroption translate="label comment">
|
37 |
+
<label>Newsletter Options</label>
|
38 |
+
<sort_order>80</sort_order>
|
39 |
+
<show_in_default>1</show_in_default>
|
40 |
+
<show_in_website>1</show_in_website>
|
41 |
+
<show_in_store>1</show_in_store>
|
42 |
+
<fields>
|
43 |
+
|
44 |
+
<dropdown translate="label comment">
|
45 |
+
<label>Newsletter Type</label>
|
46 |
+
<frontend_type>select</frontend_type>
|
47 |
+
<source_model>techinflollp_newsletteroption/system_config_source_newslettertype_values</source_model>
|
48 |
+
<sort_order>4</sort_order>
|
49 |
+
<show_in_default>1</show_in_default>
|
50 |
+
<show_in_website>1</show_in_website>
|
51 |
+
<show_in_store>1</show_in_store>
|
52 |
+
</dropdown>
|
53 |
+
|
54 |
+
</fields>
|
55 |
+
</newsletteroption>
|
56 |
+
</groups>
|
57 |
+
</techinflollp>
|
58 |
+
</sections>
|
59 |
+
</config>
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Techinflo_MyStoreWidget>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
<depends>
|
8 |
+
<Mage_Cms />
|
9 |
+
</depends>
|
10 |
+
<version>1.0.0</version>
|
11 |
+
</Techinflo_MyStoreWidget>
|
12 |
+
</modules>
|
13 |
+
</config>
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!--step 1: registering the module-->
|
3 |
+
<config>
|
4 |
+
<modules>
|
5 |
+
<Techinflo_Mystore>
|
6 |
+
<active>true</active>
|
7 |
+
<codePool>local</codePool>
|
8 |
+
</Techinflo_Mystore>
|
9 |
+
</modules>
|
10 |
+
</config>
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Techinflo_MystoreOption>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Techinflo_MystoreOption>
|
8 |
+
</modules>
|
9 |
+
</config>
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Techinflo_Mystore</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary><p>My STORE extension sorts the products based on user preferences saved,
|
10 |
+
user will see only he/his preferred range of products.</p></summary>
|
11 |
+
<description><p>My STORE extension sorts the products based on user preferences saved,
|
12 |
+
user will see only he/his preferred range of products.</p>
|
13 |
+
<p>User Store preferences based on following terms and able to save the user specific preferences.
|
14 |
+
</p>
|
15 |
+

|
16 |
+
1. My store tab for the specific user to buy his own preferable products.
|
17 |
+

|
18 |
+
2. User can set their product preferences based on the following terms.
|
19 |
+

|
20 |
+
- Based on product categories like Men, Women, Kid etc
|
21 |
+
- Color ranges,
|
22 |
+
- Price ranges,
|
23 |
+
- Manufacturer ranges,
|
24 |
+
- Newly arrived ranges,
|
25 |
+
- Weight ranges,
|
26 |
+
- Out of stock
|
27 |
+

|
28 |
+
3. Saving the user preferences and showing the same preference ranged products on revisits.
|
29 |
+

|
30 |
+
4. Allowing the user to set preferences and filter the products of their preference.
|
31 |
+

|
32 |
+
5. User is able to change or update his preferences periodically.
|
33 |
+
</description>
|
34 |
+
<notes><p>My STORE extension sorts the products based on user preferences saved,
|
35 |
+
user will see only he/his preferred range of products.</p>
|
36 |
+
<p>User Store preferences based on following terms and able to save the user specific preferences.
|
37 |
+
</p>
|
38 |
+

|
39 |
+
1. My store tab for the specific user to buy his own preferable products.
|
40 |
+

|
41 |
+
2. User can set their product preferences based on the following terms.
|
42 |
+

|
43 |
+
- Based on product categories like Men, Women, Kid etc
|
44 |
+
- Color ranges,
|
45 |
+
- Price ranges,
|
46 |
+
- Manufacturer ranges,
|
47 |
+
- Newly arrived ranges,
|
48 |
+
- Weight ranges,
|
49 |
+
- Out of stock
|
50 |
+

|
51 |
+
3. Saving the user preferences and showing the same preference ranged products on revisits.
|
52 |
+

|
53 |
+
4. Allowing the user to set preferences and filter the products of their preference.
|
54 |
+

|
55 |
+
5. User is able to change or update his preferences periodically.
|
56 |
+
</notes>
|
57 |
+
<authors><author><name>Techinflo</name><user>Techinflo</user><email>anil.gupta@techinflo.com</email></author></authors>
|
58 |
+
<date>2014-02-07</date>
|
59 |
+
<time>06:04:25</time>
|
60 |
+
<contents><target name="magelocal"><dir name="Techinflo"><dir name="Mystore"><dir name="Block"><dir name="Customer"><dir name="Account"><file name="Customer.php" hash="cfaedd1671fece5703e0e0cad0dbc877"/><file name="Lists.php" hash="9434978ca01408f825f90dbf1355d881"/></dir></dir><file name="Customer.php" hash="cfaedd1671fece5703e0e0cad0dbc877"/></dir><dir name="Helper"><file name="Data.php" hash="5d8918a8a1805d1f6449e49da0fd93aa"/></dir><dir name="Model"><dir name="Resource"><file name="Setup.php" hash="26218eed501c862169b31a5b4fb6dad4"/></dir></dir><dir name="controllers"><file name="AccountpageController.php" hash="16a5d7ccc5d8a33e7a7ae4f731e58f3b"/><file name="IndexController.php" hash="185b67e1ce32c43bce80031a6b5ca631"/><file name="new 2.txt" hash="c57bcc691f38a0cb749848e973f7f1e3"/></dir><dir name="etc"><file name="config.xml" hash="f26dee04767827cd2dc54809e8dcb3ea"/></dir><dir name="sql"><dir name="techinflo_mystore_setup"><file name="install-0.0.1.php" hash="cb7cd771efe5474053a2bba7b5ce46d4"/></dir></dir></dir><dir name="MystoreOption"><dir name="Block"><file name="View.php" hash="c899a057f5b1bc103dd90b8490d70ec3"/><file name="View.php.bak" hash="7ae6dbe3ca73abc61a31d7dc57480942"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><dir name="Preferencetype"><file name="Values.php" hash="7bcad16584362872371566ad216ea69c"/><file name="Values.php.bak" hash="2fc1dc3ca3fcaad491b78edb1213cbd3"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="AccountController.php" hash="8990a68bf93a3140dd0cb1f71f69381d"/><file name="IndexController.php" hash="d7c654303d3110353be1393216c859aa"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1fb0e377a00beaf8ca80ccfa9da7605d"/><file name="adminhtml.xml.bak" hash="1fb0e377a00beaf8ca80ccfa9da7605d"/><file name="config.xml" hash="bc4048d28dd79302516ef1975fea1895"/><file name="config.xml.bak" hash="f0abb79c228ea62581ba31cf2c05eabb"/><file name="system.xml" hash="6fd802dbb2ac22564b734350fa84d741"/><file name="system.xml.bak" hash="0a6b033f46052ea1fab6e6318cc6981d"/></dir></dir><dir name="MyStoreWidget"><dir name="Block"><file name="Index.php" hash="e5ee942b2cfa08ade37e148360a0a3a2"/><file name="Mystore_Widget.php" hash="b8f716051317e3f7c1f8161568a19409"/></dir><dir name="Helper"><file name="Data.php" hash="2e56db7f8ed9f0f1f11189a8e1953a9e"/></dir><dir name="controllers"><file name="IndexController.php" hash="c2e19b8b52dfba9c45ae4ee07d6e1cb4"/></dir><dir name="etc"><file name="config.xml" hash="39f37c40fb2ac8db4fa0d4adf6c774c3"/><file name="widget.xml" hash="86294639b89da4df4325fa5acbd784fc"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><dir name="Techinflo"><file name="local.xml" hash=""/><file name="page.xml" hash=""/><dir name="customer"><file name="mystore.xml" hash=""/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Techinflo_Mystore.xml" hash="ad841303bb27253a9b1ddab75bd3c2d5"/><file name="Techinflo_MystoreOption.xml" hash="43d4fbccdd30e20b25e854e06e23dedb"/><file name="Techinflo_MyStoreWidget.xml" hash="9084eeed111daefd0620f273f87d2418"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="mystore"><file name="lightbox-form.css" hash="2fe2884fb0df9071dda49197cb9d8b5b"/><file name="prefference.css" hash="20db2c610de384fb4348c1f3d9fa7ea7"/></dir></dir><dir name="js"><dir name="mystore"><file name="lightbox-form.js" hash="6936ec37b9cbb574f02e0c81e74de7d7"/><file name="mystore_page.js" hash="740bf6f08e54dc97b3b2d0928302ee75"/><file name="prefference.js" hash="1f0ad7603dd9d4558bf7ab496a8dab1b"/></dir></dir></dir></dir></dir></target></contents>
|
61 |
+
<compatible/>
|
62 |
+
<dependencies><required><php><min>5.1.0</min><max>6.1.0</max></php></required></dependencies>
|
63 |
+
</package>
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
#shadowing
|
3 |
+
{
|
4 |
+
display: none;
|
5 |
+
position: fixed;
|
6 |
+
top: 0%;
|
7 |
+
left: 0%;
|
8 |
+
width: 100%;
|
9 |
+
height: 100%;
|
10 |
+
background-color: #CCA;
|
11 |
+
z-index:10;
|
12 |
+
opacity:0.5;
|
13 |
+
filter: alpha(opacity=50);
|
14 |
+
}
|
15 |
+
|
16 |
+
|
17 |
+
#box {
|
18 |
+
background-color: #FFFFFF;
|
19 |
+
border: 1px solid #000000;
|
20 |
+
display: none;
|
21 |
+
height: 250px;
|
22 |
+
left: 20%;
|
23 |
+
margin: 0;
|
24 |
+
overflow: auto;
|
25 |
+
padding: 48px;
|
26 |
+
position: fixed;
|
27 |
+
top: 20%;
|
28 |
+
width: 500px;
|
29 |
+
z-index: 101;
|
30 |
+
text-align: left;
|
31 |
+
}
|
32 |
+
|
33 |
+
#boxtitle
|
34 |
+
{
|
35 |
+
position:absolute;
|
36 |
+
float:center;
|
37 |
+
top:0;
|
38 |
+
left:0;
|
39 |
+
width: 596px;
|
40 |
+
height:24px;
|
41 |
+
padding:0;
|
42 |
+
padding-top:4px;
|
43 |
+
left-padding:8px;
|
44 |
+
margin:0;
|
45 |
+
border-bottom:4px solid #3CF;
|
46 |
+
background-color: #09c;
|
47 |
+
color:white;
|
48 |
+
text-align:center;
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
#close-button {
|
53 |
+
border: 1px solid #000000;
|
54 |
+
color: #000000;
|
55 |
+
float: right;
|
56 |
+
margin-right: -36px;
|
57 |
+
padding: 0 2px;
|
58 |
+
position: relative;
|
59 |
+
text-decoration: none;
|
60 |
+
top: -45px;
|
61 |
+
}
|
62 |
+
|
63 |
+
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*Style Sheet for Mystore Preferences */
|
2 |
+
|
3 |
+
#mainform h1 {color: #2F2F2F;
|
4 |
+
font: 16px/1.55 Arial,Helvetica,sans-serif;
|
5 |
+
padding:2px;
|
6 |
+
color: black;
|
7 |
+
font-weight: bold;
|
8 |
+
}
|
9 |
+
|
10 |
+
#mainform h4 {
|
11 |
+
color: #2F2F2F;
|
12 |
+
font: 14px/1.55 Arial,Helvetica,sans-serif;
|
13 |
+
padding:2px;
|
14 |
+
color: black;
|
15 |
+
font-weight: bold;
|
16 |
+
}
|
17 |
+
|
18 |
+
.odd-row {color: #2F2F2F;
|
19 |
+
font: 12px/1.55 Arial,Helvetica,sans-serif;
|
20 |
+
padding:8px;
|
21 |
+
color: black;
|
22 |
+
margin-left:30px;}
|
23 |
+
|
24 |
+
.even-row { color: #2F2F2F;
|
25 |
+
font: 12px/1.55 Arial,Helvetica,sans-serif;
|
26 |
+
padding:8px;
|
27 |
+
color: black;
|
28 |
+
margin-left:30px;}
|
29 |
+
|
30 |
+
.form-submit-button input {
|
31 |
+
padding: 3px;
|
32 |
+
background: #ffffff;
|
33 |
+
border-radius: 5px;
|
34 |
+
border:1px solid grey;
|
35 |
+
color: #2F2F2F;
|
36 |
+
font: 12px/1.55 Arial,Helvetica,sans-serif;
|
37 |
+
font-weight:bold;
|
38 |
+
margin-top:20px;
|
39 |
+
}
|
40 |
+
|
41 |
+
#shoow-hide-box {
|
42 |
+
margin-left: 25px;
|
43 |
+
}
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function gradient(id, level)
|
2 |
+
{
|
3 |
+
var box = document.getElementById(id);
|
4 |
+
box.style.opacity = level;
|
5 |
+
box.style.MozOpacity = level;
|
6 |
+
box.style.KhtmlOpacity = level;
|
7 |
+
box.style.filter = "alpha(opacity=" + level * 100 + ")";
|
8 |
+
box.style.display="block";
|
9 |
+
return;
|
10 |
+
}
|
11 |
+
|
12 |
+
|
13 |
+
function fadein(id)
|
14 |
+
{
|
15 |
+
var level = 0;
|
16 |
+
while(level <= 1)
|
17 |
+
{
|
18 |
+
setTimeout( "gradient('" + id + "'," + level + ")", (level* 1000) + 10);
|
19 |
+
level += 0.01;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
+
// Open the lightbox
|
25 |
+
|
26 |
+
|
27 |
+
function openbox(formtitle, fadin)
|
28 |
+
{
|
29 |
+
var box = document.getElementById('box');
|
30 |
+
document.getElementById('shadowing').style.display='block';
|
31 |
+
|
32 |
+
var btitle = document.getElementById('boxtitle');
|
33 |
+
btitle.innerHTML = formtitle;
|
34 |
+
|
35 |
+
if(fadin)
|
36 |
+
{
|
37 |
+
gradient("box", 0);
|
38 |
+
fadein("box");
|
39 |
+
}
|
40 |
+
else
|
41 |
+
{
|
42 |
+
box.style.display='block';
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
// Close the lightbox
|
48 |
+
|
49 |
+
function closebox()
|
50 |
+
{
|
51 |
+
document.getElementById('box').style.display='none';
|
52 |
+
document.getElementById('shadowing').style.display='none';
|
53 |
+
}
|
54 |
+
|
55 |
+
|
56 |
+
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function showMeNoOne (boxnoone) {
|
2 |
+
|
3 |
+
var chboxsone = document.getElementsByName("price");
|
4 |
+
|
5 |
+
var visone = "none";
|
6 |
+
|
7 |
+
for(var i=0;i<chboxsone.length;i++) {
|
8 |
+
if(chboxsone[i].checked){
|
9 |
+
visone = "block";
|
10 |
+
break;
|
11 |
+
}
|
12 |
+
}
|
13 |
+
document.getElementById(boxnoone).style.display = visone;
|
14 |
+
|
15 |
+
}
|
16 |
+
|
17 |
+
function showMeNoTwo (boxnotwo) {
|
18 |
+
var chboxstwo = document.getElementsByName("category");
|
19 |
+
var vistwo = "none";
|
20 |
+
|
21 |
+
for(var i=0;i<chboxstwo.length;i++) {
|
22 |
+
if(chboxstwo[i].checked){
|
23 |
+
vistwo = "block";
|
24 |
+
break;
|
25 |
+
}
|
26 |
+
}
|
27 |
+
document.getElementById(boxnotwo).style.display = vistwo;
|
28 |
+
}
|
29 |
+
|
30 |
+
function showMeNoThree (boxnothree) {
|
31 |
+
var chboxsthree = document.getElementsByName("brand");
|
32 |
+
var visthree = "none";
|
33 |
+
|
34 |
+
for(var i=0;i<chboxsthree.length;i++) {
|
35 |
+
if(chboxsthree[i].checked){
|
36 |
+
visthree = "block";
|
37 |
+
break;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
document.getElementById(boxnothree).style.display = visthree;
|
41 |
+
}
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function showMeOne (boxone) {
|
2 |
+
|
3 |
+
var chboxsone = document.getElementsByName("price");
|
4 |
+
|
5 |
+
var visone = "none";
|
6 |
+
|
7 |
+
for(var i=0;i<chboxsone.length;i++) {
|
8 |
+
if(chboxsone[i].checked){
|
9 |
+
visone = "block";
|
10 |
+
break;
|
11 |
+
}
|
12 |
+
}
|
13 |
+
document.getElementById(boxone).style.display = visone;
|
14 |
+
|
15 |
+
}
|
16 |
+
|
17 |
+
function showMeTwo (boxtwo) {
|
18 |
+
var chboxstwo = document.getElementsByName("category");
|
19 |
+
var vistwo = "none";
|
20 |
+
|
21 |
+
for(var i=0;i<chboxstwo.length;i++) {
|
22 |
+
if(chboxstwo[i].checked){
|
23 |
+
vistwo = "block";
|
24 |
+
break;
|
25 |
+
}
|
26 |
+
}
|
27 |
+
document.getElementById(boxtwo).style.display = vistwo;
|
28 |
+
}
|
29 |
+
|
30 |
+
function showMeThree (boxthree) {
|
31 |
+
var chboxsthree = document.getElementsByName("brand");
|
32 |
+
var visthree = "none";
|
33 |
+
|
34 |
+
for(var i=0;i<chboxsthree.length;i++) {
|
35 |
+
if(chboxsthree[i].checked){
|
36 |
+
visthree = "block";
|
37 |
+
break;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
document.getElementById(boxthree).style.display = visthree;
|
41 |
+
}
|