Version Notes
- Minor bugfixes
- Added Enterprise 1.9 Fullpagecache compatibility
Download this release
Release Info
Developer | Magento Core Team |
Extension | epoqRS |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.11 to 1.1.0
- app/code/community/Flagbit/EpoqInterface/Block/Abstract.php +10 -2
- app/code/community/Flagbit/EpoqInterface/Block/Export/Productlist.php +11 -7
- app/code/community/Flagbit/EpoqInterface/Block/Recommentation/Product.php +1 -0
- app/code/community/Flagbit/EpoqInterface/Model/Abstract.php +0 -1
- app/code/community/Flagbit/EpoqInterface/Model/Container/Product.php +32 -0
- app/code/community/Flagbit/EpoqInterface/Model/Container/TrackProduct.php +31 -0
- app/code/community/Flagbit/EpoqInterface/Model/Recommendation/Product.php +11 -3
- app/code/community/Flagbit/EpoqInterface/etc/cache.xml +19 -0
- app/code/community/Flagbit/EpoqInterface/etc/config.xml +1 -1
- app/design/frontend/base/default/layout/epoqinterface.xml +68 -0
- app/design/frontend/base/default/template/epoqinterface/recommendation/cart.phtml +59 -0
- app/design/frontend/base/default/template/epoqinterface/recommendation/product.phtml +59 -0
- app/design/frontend/base/default/template/epoqinterface/recommendation/user.phtml +60 -0
- package.xml +5 -5
app/code/community/Flagbit/EpoqInterface/Block/Abstract.php
CHANGED
@@ -192,8 +192,16 @@ class Flagbit_EpoqInterface_Block_Abstract extends Mage_Core_Block_Abstract
|
|
192 |
* @return Mage_Catalog_Model_Product
|
193 |
*/
|
194 |
public function getProduct()
|
195 |
-
{
|
196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
}
|
198 |
|
199 |
|
192 |
* @return Mage_Catalog_Model_Product
|
193 |
*/
|
194 |
public function getProduct()
|
195 |
+
{
|
196 |
+
$productId = null;
|
197 |
+
if(Mage::registry('current_product') instanceof Mage_Catalog_Model_Product){
|
198 |
+
$productId = Mage::registry('current_product')->getId();
|
199 |
+
}else{
|
200 |
+
$processor = Mage::getSingleton('enterprise_pagecache/processor');
|
201 |
+
$cacheId = $processor->getRequestCacheId() . '_current_product_id';
|
202 |
+
$productId = Mage::app()->loadCache($cacheId);
|
203 |
+
}
|
204 |
+
return Mage::getSingleton('catalog/product')->load($productId);
|
205 |
}
|
206 |
|
207 |
|
app/code/community/Flagbit/EpoqInterface/Block/Export/Productlist.php
CHANGED
@@ -86,13 +86,16 @@ class Flagbit_EpoqInterface_Block_Export_Productlist extends Flagbit_EpoqInterfa
|
|
86 |
$this->setData('product', $product);
|
87 |
|
88 |
// reset time limit
|
89 |
-
set_time_limit(30);
|
90 |
-
|
91 |
/*@var $product Mage_Catalog_Model_Product */
|
92 |
$product->setData($args['row']);
|
93 |
-
$product->load($product->getId());
|
94 |
-
$
|
95 |
-
$
|
|
|
|
|
|
|
96 |
|
97 |
// get Productcategory
|
98 |
$category = $product->getCategoryCollection()->load()->getFirstItem();
|
@@ -131,7 +134,8 @@ class Flagbit_EpoqInterface_Block_Export_Productlist extends Flagbit_EpoqInterfa
|
|
131 |
$data['e:variant_of'] = $parentProduct[0];
|
132 |
$data['c:mgt_parents'] = implode(',', $parentProduct);
|
133 |
}
|
134 |
-
if($product->isConfigurable()
|
|
|
135 |
$data['e:variants'] = implode(',', $this->_getVariantIds($product));
|
136 |
}
|
137 |
|
@@ -159,7 +163,7 @@ class Flagbit_EpoqInterface_Block_Export_Productlist extends Flagbit_EpoqInterfa
|
|
159 |
*/
|
160 |
protected function _getVariantIds($product){
|
161 |
|
162 |
-
$childProducts = $product->getTypeInstance()->getUsedProducts(null, $product);
|
163 |
$childProductIds = array();
|
164 |
foreach((array) $childProducts as $childProduct){
|
165 |
if ($childProduct->isSaleable()) {
|
86 |
$this->setData('product', $product);
|
87 |
|
88 |
// reset time limit
|
89 |
+
@set_time_limit(30);
|
90 |
+
|
91 |
/*@var $product Mage_Catalog_Model_Product */
|
92 |
$product->setData($args['row']);
|
93 |
+
$product->load($product->getId());
|
94 |
+
$parentProduct = array();
|
95 |
+
if(method_exists($product, 'getParentProductIds')){
|
96 |
+
$product->loadParentProductIds();
|
97 |
+
$parentProduct = $product->getParentProductIds();
|
98 |
+
}
|
99 |
|
100 |
// get Productcategory
|
101 |
$category = $product->getCategoryCollection()->load()->getFirstItem();
|
134 |
$data['e:variant_of'] = $parentProduct[0];
|
135 |
$data['c:mgt_parents'] = implode(',', $parentProduct);
|
136 |
}
|
137 |
+
if($product->isConfigurable()
|
138 |
+
&& $product->getTypeInstance(true) instanceof Mage_Catalog_Model_Product_Type_Configurable){
|
139 |
$data['e:variants'] = implode(',', $this->_getVariantIds($product));
|
140 |
}
|
141 |
|
163 |
*/
|
164 |
protected function _getVariantIds($product){
|
165 |
|
166 |
+
$childProducts = $product->getTypeInstance(true)->getUsedProducts(null, $product);
|
167 |
$childProductIds = array();
|
168 |
foreach((array) $childProducts as $childProduct){
|
169 |
if ($childProduct->isSaleable()) {
|
app/code/community/Flagbit/EpoqInterface/Block/Recommentation/Product.php
CHANGED
@@ -28,6 +28,7 @@ class Flagbit_EpoqInterface_Block_Recommentation_Product extends Flagbit_EpoqInt
|
|
28 |
*/
|
29 |
protected function _toHtml()
|
30 |
{
|
|
|
31 |
if(!Mage::getStoreConfig(self::XML_STATUS_PATH)){
|
32 |
return '';
|
33 |
}
|
28 |
*/
|
29 |
protected function _toHtml()
|
30 |
{
|
31 |
+
|
32 |
if(!Mage::getStoreConfig(self::XML_STATUS_PATH)){
|
33 |
return '';
|
34 |
}
|
app/code/community/Flagbit/EpoqInterface/Model/Abstract.php
CHANGED
@@ -50,7 +50,6 @@ class Flagbit_EpoqInterface_Model_Abstract extends Mage_Core_Model_Abstract {
|
|
50 |
try{
|
51 |
/*@var $result Zend_Rest_Client_Result */
|
52 |
$result = $this->getRestClient()->get();
|
53 |
-
|
54 |
}catch (Exception $e){
|
55 |
|
56 |
// developer mode
|
50 |
try{
|
51 |
/*@var $result Zend_Rest_Client_Result */
|
52 |
$result = $this->getRestClient()->get();
|
|
|
53 |
}catch (Exception $e){
|
54 |
|
55 |
// developer mode
|
app/code/community/Flagbit/EpoqInterface/Model/Container/Product.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Flagbit_EpoqInterface_Model_Container_Product extends Enterprise_PageCache_Model_Container_Abstract
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* Redirect to content processing on new message
|
7 |
+
*
|
8 |
+
* @param string $content
|
9 |
+
* @return bool
|
10 |
+
*/
|
11 |
+
public function applyWithoutApp(&$content)
|
12 |
+
{
|
13 |
+
return false;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Render block content
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
protected function _renderBlock()
|
22 |
+
{
|
23 |
+
$block = $this->_placeholder->getAttribute('block');
|
24 |
+
$template = $this->_placeholder->getAttribute('template');
|
25 |
+
|
26 |
+
$block = new $block;
|
27 |
+
$block->setTemplate($template);
|
28 |
+
$block->setLayout(Mage::app()->getLayout());
|
29 |
+
|
30 |
+
return $block->toHtml();
|
31 |
+
}
|
32 |
+
}
|
app/code/community/Flagbit/EpoqInterface/Model/Container/TrackProduct.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Flagbit_EpoqInterface_Model_Container_TrackProduct extends Enterprise_PageCache_Model_Container_Abstract
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* Redirect to content processing on new message
|
7 |
+
*
|
8 |
+
* @param string $content
|
9 |
+
* @return bool
|
10 |
+
*/
|
11 |
+
public function applyWithoutApp(&$content)
|
12 |
+
{
|
13 |
+
return false;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Render block content
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
protected function _renderBlock()
|
22 |
+
{
|
23 |
+
$block = $this->_placeholder->getAttribute('block');
|
24 |
+
$template = $this->_placeholder->getAttribute('template');
|
25 |
+
|
26 |
+
$block = new $block;
|
27 |
+
$block->setLayout(Mage::app()->getLayout());
|
28 |
+
|
29 |
+
return $block->toHtml();
|
30 |
+
}
|
31 |
+
}
|
app/code/community/Flagbit/EpoqInterface/Model/Recommendation/Product.php
CHANGED
@@ -22,7 +22,7 @@ class Flagbit_EpoqInterface_Model_Recommendation_Product extends Flagbit_EpoqInt
|
|
22 |
protected function getParamsArray(){
|
23 |
|
24 |
$params = array(
|
25 |
-
'productId' => $this->
|
26 |
);
|
27 |
|
28 |
return array_merge($params, parent::getParamsArray());
|
@@ -34,9 +34,17 @@ class Flagbit_EpoqInterface_Model_Recommendation_Product extends Flagbit_EpoqInt
|
|
34 |
*
|
35 |
* @return Mage_Catalog_Model_Product
|
36 |
*/
|
37 |
-
public function
|
38 |
{
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
|
42 |
|
22 |
protected function getParamsArray(){
|
23 |
|
24 |
$params = array(
|
25 |
+
'productId' => $this->getProductId(),
|
26 |
);
|
27 |
|
28 |
return array_merge($params, parent::getParamsArray());
|
34 |
*
|
35 |
* @return Mage_Catalog_Model_Product
|
36 |
*/
|
37 |
+
public function getProductId()
|
38 |
{
|
39 |
+
$productId = null;
|
40 |
+
if(Mage::registry('current_product') instanceof Mage_Catalog_Model_Product){
|
41 |
+
$productId = Mage::registry('current_product')->getId();
|
42 |
+
}else{
|
43 |
+
$processor = Mage::getSingleton('enterprise_pagecache/processor');
|
44 |
+
$cacheId = $processor->getRequestCacheId() . '_current_product_id';
|
45 |
+
$productId = Mage::app()->loadCache($cacheId);
|
46 |
+
}
|
47 |
+
return $productId;
|
48 |
}
|
49 |
|
50 |
|
app/code/community/Flagbit/EpoqInterface/etc/cache.xml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<placeholders>
|
4 |
+
<epoqinterface_recommentation_product>
|
5 |
+
<block>epoqinterface/recommentation_product</block>
|
6 |
+
<placeholder>EPOQ_RECOMMENTATION_PRODUCT</placeholder>
|
7 |
+
<container>Flagbit_EpoqInterface_Model_Container_Product</container>
|
8 |
+
<cache_lifetime>0</cache_lifetime>
|
9 |
+
<template>epoqinterface/recommendation/product.phtml</template>
|
10 |
+
</epoqinterface_recommentation_product>
|
11 |
+
<epoqinterface_track_product>
|
12 |
+
<block>epoqinterface/track_product</block>
|
13 |
+
<placeholder>EPOQ_TRACK_PRODUCT</placeholder>
|
14 |
+
<container>Flagbit_EpoqInterface_Model_Container_TrackProduct</container>
|
15 |
+
<cache_lifetime>0</cache_lifetime>
|
16 |
+
</epoqinterface_track_product>
|
17 |
+
</placeholders>
|
18 |
+
</config>
|
19 |
+
|
app/code/community/Flagbit/EpoqInterface/etc/config.xml
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
<modules>
|
21 |
<Flagbit_EpoqInterface>
|
22 |
<active>true</active>
|
23 |
-
<version>1.0
|
24 |
</Flagbit_EpoqInterface>
|
25 |
</modules>
|
26 |
|
20 |
<modules>
|
21 |
<Flagbit_EpoqInterface>
|
22 |
<active>true</active>
|
23 |
+
<version>1.1.0</version>
|
24 |
</Flagbit_EpoqInterface>
|
25 |
</modules>
|
26 |
|
app/design/frontend/base/default/layout/epoqinterface.xml
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/* *
|
4 |
+
* This script is part of the epoq Recommendation Service project *
|
5 |
+
* *
|
6 |
+
* TypoGento is free software; you can redistribute it and/or modify it *
|
7 |
+
* under the terms of the GNU General Public License version 2 as *
|
8 |
+
* published by the Free Software Foundation. *
|
9 |
+
* *
|
10 |
+
* This script is distributed in the hope that it will be useful, but *
|
11 |
+
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
|
12 |
+
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
|
13 |
+
* Public License for more details. *
|
14 |
+
* *
|
15 |
+
* @version $Id: epoqinterface.xml 466 2010-07-08 12:30:54Z weller $
|
16 |
+
* @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
|
17 |
+
*/
|
18 |
+
-->
|
19 |
+
<layout version="0.1.0">
|
20 |
+
|
21 |
+
<default>
|
22 |
+
<reference name="head">
|
23 |
+
<block type="epoqinterface/head" name="epoqinterface_head"/>
|
24 |
+
</reference>
|
25 |
+
</default>
|
26 |
+
|
27 |
+
<catalog_product_view>
|
28 |
+
<reference name="content">
|
29 |
+
<block type="epoqinterface/track_product" name="epoqinterface.track.product"/>
|
30 |
+
<reference name="product.info.additional">
|
31 |
+
<block type="epoqinterface/recommentation_product" name="epoqinterface.recommendation.product" template="epoqinterface/recommendation/product.phtml">
|
32 |
+
<!-- <action method="setRules"><rules>name(value)</rules></action> -->
|
33 |
+
</block>
|
34 |
+
</reference>
|
35 |
+
</reference>
|
36 |
+
</catalog_product_view>
|
37 |
+
|
38 |
+
<checkout_cart_index>
|
39 |
+
<reference name="content">
|
40 |
+
<block type="epoqinterface/track_cart" name="epoqinterface.track.cart"/>
|
41 |
+
<reference name="checkout.cart">
|
42 |
+
<block type="epoqinterface/recommentation_cart" name="epoqinterface.recommendation.cart" template="epoqinterface/recommendation/cart.phtml"/>
|
43 |
+
</reference>
|
44 |
+
</reference>
|
45 |
+
</checkout_cart_index>
|
46 |
+
|
47 |
+
<checkout_multishipping_success>
|
48 |
+
<reference name="content">
|
49 |
+
<block type="epoqinterface/track_cart" name="epoqinterface.track.cart"/>
|
50 |
+
</reference>
|
51 |
+
</checkout_multishipping_success>
|
52 |
+
|
53 |
+
<checkout_onepage_success>
|
54 |
+
<reference name="content">
|
55 |
+
<block type="epoqinterface/track_cart" name="epoqinterface.track.cart"/>
|
56 |
+
</reference>
|
57 |
+
</checkout_onepage_success>
|
58 |
+
|
59 |
+
<customer_account_index>
|
60 |
+
<reference name="customer_account_dashboard">
|
61 |
+
<block type="epoqinterface/recommentation_user" name="epoqinterface.recommendation.user" as="info1" template="epoqinterface/recommendation/user.phtml"/>
|
62 |
+
</reference>
|
63 |
+
</customer_account_index>
|
64 |
+
|
65 |
+
<epoqinterface_index_productlist>
|
66 |
+
<block type="epoqinterface/export_productlist" output="toHtml" name="epoqinterface.productlist"/>
|
67 |
+
</epoqinterface_index_productlist>
|
68 |
+
</layout>
|
app/design/frontend/base/default/template/epoqinterface/recommendation/cart.phtml
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* *
|
3 |
+
* This script is part of the epoq Recommendation Service project *
|
4 |
+
* *
|
5 |
+
* TypoGento is free software; you can redistribute it and/or modify it *
|
6 |
+
* under the terms of the GNU General Public License version 2 as *
|
7 |
+
* published by the Free Software Foundation. *
|
8 |
+
* *
|
9 |
+
* This script is distributed in the hope that it will be useful, but *
|
10 |
+
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
|
11 |
+
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
|
12 |
+
* Public License for more details. *
|
13 |
+
* *
|
14 |
+
* @version $Id: cart.phtml 487 2010-08-05 12:32:57Z weller $
|
15 |
+
* @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
|
16 |
+
*/
|
17 |
+
?>
|
18 |
+
|
19 |
+
<?php if(count($this->getItemCollection()->getItems())): ?>
|
20 |
+
<div class="collateral-box up-sell">
|
21 |
+
<div class="head"><h4><?php echo $this->__('epoq: You may also be interested in the following product(s)') ?></h4></div>
|
22 |
+
<table cellspacing="0" class="generic-product-grid catalog-listing" id="upsell-product-table">
|
23 |
+
<?php // $this->setColumnCount(4); // uncomment this line if you want to have another number of columns. also can be changed in layout ?>
|
24 |
+
<?php $this->resetItemsIterator() ?>
|
25 |
+
<?php for($_i=0;$_i<$this->getRowCount();$_i++): ?>
|
26 |
+
<tr>
|
27 |
+
<?php for($_j=0;$_j<$this->getColumnCount();$_j++): ?>
|
28 |
+
<?php if($_link=$this->getIterableItem()): ?>
|
29 |
+
<td>
|
30 |
+
<p class="product-image"><a href="<?php echo $_link->getProductUrl() ?>" class="epoq-recommentation-link"><img src="<?php echo $this->helper('catalog/image')->init($_link, 'small_image')->resize(125) ?>" width="125" height="125" alt="<?php echo $this->htmlEscape($_link->getName()) ?>" /></a></p>
|
31 |
+
<h5><a href="<?php echo $_link->getProductUrl() ?>" class="epoq-recommentation-link"><?php echo $this->htmlEscape($_link->getName()) ?></a></h5>
|
32 |
+
<?php echo $this->getPriceHtml($_link, true) ?>
|
33 |
+
<?php echo $this->getReviewsSummaryHtml($_link) ?>
|
34 |
+
</td>
|
35 |
+
<?php else: ?>
|
36 |
+
<td class="empty-product"> </td>
|
37 |
+
<?php endif; ?>
|
38 |
+
<?php endfor; ?>
|
39 |
+
</tr>
|
40 |
+
<?php endfor; ?>
|
41 |
+
</table>
|
42 |
+
<script type="text/javascript">decorateTable('upsell-product-table')</script>
|
43 |
+
</div>
|
44 |
+
<script type="text/javascript">
|
45 |
+
$$('a.epoq-recommentation-link').each(function(elem, index){
|
46 |
+
var newParam = 'recommentation_id=<?php echo $this->getSession()->getLastRecommentationId();?>',
|
47 |
+
params = '?' + newParam;
|
48 |
+
params = elem.href.replace(new RegExp('[\?&]' + 'recommentation_id' + '[^&]*'), '$1' + newParam);
|
49 |
+
if (params === elem.href) {
|
50 |
+
if(elem.href.indexOf('?') == '-1'){
|
51 |
+
params += '?' + newParam;
|
52 |
+
}else{
|
53 |
+
params += '&' + newParam;
|
54 |
+
}
|
55 |
+
}
|
56 |
+
elem.href = params;
|
57 |
+
});
|
58 |
+
</script>
|
59 |
+
<?php endif ?>
|
app/design/frontend/base/default/template/epoqinterface/recommendation/product.phtml
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* *
|
3 |
+
* This script is part of the epoq Recommendation Service project *
|
4 |
+
* *
|
5 |
+
* TypoGento is free software; you can redistribute it and/or modify it *
|
6 |
+
* under the terms of the GNU General Public License version 2 as *
|
7 |
+
* published by the Free Software Foundation. *
|
8 |
+
* *
|
9 |
+
* This script is distributed in the hope that it will be useful, but *
|
10 |
+
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
|
11 |
+
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
|
12 |
+
* Public License for more details. *
|
13 |
+
* *
|
14 |
+
* @version $Id: product.phtml 487 2010-08-05 12:32:57Z weller $
|
15 |
+
* @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
|
16 |
+
*/
|
17 |
+
?>
|
18 |
+
|
19 |
+
<?php if(count($this->getItemCollection()->getItems())): ?>
|
20 |
+
<div class="collateral-box up-sell">
|
21 |
+
<div class="head"><h4><?php echo $this->__('epoq: You may also be interested in the following product(s)') ?></h4></div>
|
22 |
+
<table cellspacing="0" class="generic-product-grid catalog-listing" id="epoq-product-table">
|
23 |
+
<?php // $this->setColumnCount(4); // uncomment this line if you want to have another number of columns. also can be changed in layout ?>
|
24 |
+
<?php $this->resetItemsIterator() ?>
|
25 |
+
<?php for($_i=0;$_i<$this->getRowCount();$_i++): ?>
|
26 |
+
<tr>
|
27 |
+
<?php for($_j=0;$_j<$this->getColumnCount();$_j++): ?>
|
28 |
+
<?php if($_link=$this->getIterableItem()): ?>
|
29 |
+
<td>
|
30 |
+
<p class="product-image"><a href="<?php echo $_link->getProductUrl() ?>" class="epoq-recommentation-link"><img src="<?php echo $this->helper('catalog/image')->init($_link, 'small_image')->resize(125) ?>" width="125" height="125" alt="<?php echo $this->htmlEscape($_link->getName()) ?>" /></a></p>
|
31 |
+
<h5><a href="<?php echo $_link->getProductUrl() ?>" class="epoq-recommentation-link"><?php echo $this->htmlEscape($_link->getName()) ?></a></h5>
|
32 |
+
<?php echo $this->getPriceHtml($_link, true) ?>
|
33 |
+
<?php echo $this->getReviewsSummaryHtml($_link) ?>
|
34 |
+
</td>
|
35 |
+
<?php else: ?>
|
36 |
+
<td class="empty-product"> </td>
|
37 |
+
<?php endif; ?>
|
38 |
+
<?php endfor; ?>
|
39 |
+
</tr>
|
40 |
+
<?php endfor; ?>
|
41 |
+
</table>
|
42 |
+
<script type="text/javascript">decorateTable('upsell-product-table')</script>
|
43 |
+
</div>
|
44 |
+
<script type="text/javascript">
|
45 |
+
$$('a.epoq-recommentation-link').each(function(elem, index){
|
46 |
+
var newParam = 'recommentation_id=<?php echo $this->getSession()->getLastRecommentationId();?>',
|
47 |
+
params = '?' + newParam;
|
48 |
+
params = elem.href.replace(new RegExp('[\?&]' + 'recommentation_id' + '[^&]*'), '$1' + newParam);
|
49 |
+
if (params === elem.href) {
|
50 |
+
if(elem.href.indexOf('?') == '-1'){
|
51 |
+
params += '?' + newParam;
|
52 |
+
}else{
|
53 |
+
params += '&' + newParam;
|
54 |
+
}
|
55 |
+
}
|
56 |
+
elem.href = params;
|
57 |
+
});
|
58 |
+
</script>
|
59 |
+
<?php endif ?>
|
app/design/frontend/base/default/template/epoqinterface/recommendation/user.phtml
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* *
|
3 |
+
* This script is part of the epoq Recommendation Service project *
|
4 |
+
* *
|
5 |
+
* TypoGento is free software; you can redistribute it and/or modify it *
|
6 |
+
* under the terms of the GNU General Public License version 2 as *
|
7 |
+
* published by the Free Software Foundation. *
|
8 |
+
* *
|
9 |
+
* This script is distributed in the hope that it will be useful, but *
|
10 |
+
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
|
11 |
+
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
|
12 |
+
* Public License for more details. *
|
13 |
+
* *
|
14 |
+
* @version $Id: user.phtml 487 2010-08-05 12:32:57Z weller $
|
15 |
+
* @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
|
16 |
+
*/
|
17 |
+
?>
|
18 |
+
|
19 |
+
<?php if(count($this->getItemCollection()->getItems())): ?>
|
20 |
+
|
21 |
+
<div class="account-box up-sell">
|
22 |
+
<div class="head"><h4><?php echo $this->__('epoq: You may also be interested in the following product(s)') ?></h4></div>
|
23 |
+
<table cellspacing="0" class="generic-product-grid catalog-listing" id="upsell-product-table">
|
24 |
+
<?php // $this->setColumnCount(4); // uncomment this line if you want to have another number of columns. also can be changed in layout ?>
|
25 |
+
<?php $this->resetItemsIterator() ?>
|
26 |
+
<?php for($_i=0;$_i<$this->getRowCount();$_i++): ?>
|
27 |
+
<tr>
|
28 |
+
<?php for($_j=0;$_j<$this->getColumnCount();$_j++): ?>
|
29 |
+
<?php if($_link=$this->getIterableItem()): ?>
|
30 |
+
<td>
|
31 |
+
<p class="product-image"><a href="<?php echo $_link->getProductUrl() ?>" class="epoq-recommentation-link"><img src="<?php echo $this->helper('catalog/image')->init($_link, 'small_image')->resize(125) ?>" width="125" height="125" alt="<?php echo $this->htmlEscape($_link->getName()) ?>" /></a></p>
|
32 |
+
<h5><a href="<?php echo $_link->getProductUrl() ?>" class="epoq-recommentation-link"><?php echo $this->htmlEscape($_link->getName()) ?></a></h5>
|
33 |
+
<?php echo $this->getPriceHtml($_link, true) ?>
|
34 |
+
<?php echo $this->getReviewsSummaryHtml($_link) ?>
|
35 |
+
</td>
|
36 |
+
<?php else: ?>
|
37 |
+
<td class="empty-product"> </td>
|
38 |
+
<?php endif; ?>
|
39 |
+
<?php endfor; ?>
|
40 |
+
</tr>
|
41 |
+
<?php endfor; ?>
|
42 |
+
</table>
|
43 |
+
<script type="text/javascript">decorateTable('upsell-product-table')</script>
|
44 |
+
</div>
|
45 |
+
<script type="text/javascript">
|
46 |
+
$$('a.epoq-recommentation-link').each(function(elem, index){
|
47 |
+
var newParam = 'recommentation_id=<?php echo $this->getSession()->getLastRecommentationId();?>',
|
48 |
+
params = '?' + newParam;
|
49 |
+
params = elem.href.replace(new RegExp('[\?&]' + 'recommentation_id' + '[^&]*'), '$1' + newParam);
|
50 |
+
if (params === elem.href) {
|
51 |
+
if(elem.href.indexOf('?') == '-1'){
|
52 |
+
params += '?' + newParam;
|
53 |
+
}else{
|
54 |
+
params += '&' + newParam;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
elem.href = params;
|
58 |
+
});
|
59 |
+
</script>
|
60 |
+
<?php endif ?>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>epoqRS</name>
|
4 |
-
<version>1.0
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
@@ -13,11 +13,11 @@
|
|
13 |
|
14 |
Try epoq Recommendation Service - free and without obligation in our 30-day trial version.</description>
|
15 |
<notes>- Minor bugfixes
|
16 |
-
- Added 1.
|
17 |
<authors><author><name>Flagbit GmbH </name><user>auto-converted</user><email>magento@flagbit.de</email></author></authors>
|
18 |
-
<date>2010-
|
19 |
-
<time>
|
20 |
-
<contents><target name="magelocale"><dir name="de_DE"><file name="Flagbit_EpoqInterface.csv" hash="5643b01f9cbebd4ce9317d839a2e428b"/></dir></target><target name="magecommunity"><dir name="Flagbit"><dir name="EpoqInterface"><dir name="Block"><dir name="Export"><file name="Productlist.php" hash="
|
21 |
<compatible/>
|
22 |
<dependencies/>
|
23 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>epoqRS</name>
|
4 |
+
<version>1.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
13 |
|
14 |
Try epoq Recommendation Service - free and without obligation in our 30-day trial version.</description>
|
15 |
<notes>- Minor bugfixes
|
16 |
+
- Added Enterprise 1.9 Fullpagecache compatibility</notes>
|
17 |
<authors><author><name>Flagbit GmbH </name><user>auto-converted</user><email>magento@flagbit.de</email></author></authors>
|
18 |
+
<date>2010-11-12</date>
|
19 |
+
<time>09:35:01</time>
|
20 |
+
<contents><target name="magelocale"><dir name="de_DE"><file name="Flagbit_EpoqInterface.csv" hash="5643b01f9cbebd4ce9317d839a2e428b"/></dir></target><target name="magecommunity"><dir name="Flagbit"><dir name="EpoqInterface"><dir name="Block"><dir name="Export"><file name="Productlist.php" hash="9bf6f2dbae103789081b6caae5d1802f"/></dir><dir name="Recommentation"><file name="Abstract.php" hash="1b02b196c062a586ac06ba4c366e9acf"/><file name="Cart.php" hash="a5c689e8cfcf9f3c8f07b88d07003684"/><file name="Product.php" hash="6ca3c8ab884b1f84486df228a91fa44e"/><file name="User.php" hash="1e8b594b8c54fb475e4595dbe39059fc"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Version.php" hash="71e3964c13333a57929221aa8e2edf07"/></dir></dir></dir></dir><dir name="Track"><file name="Cart.php" hash="4e0ce66e9832296aa7539f0573e712f1"/><file name="Product.php" hash="22e36d5c180ba8a96f0d36ab5747c485"/></dir><file name="Abstract.php" hash="10f489467f4a01975c3496df8953ffc9"/><file name="Head.php" hash="b6844d21b14dc9ebb1697be9e12a57f9"/></dir><dir name="controllers"><file name="IndexController.php" hash="6a5dbe8275701af11cd07b59ff57f4a8"/></dir><dir name="documentation"><file name="Installation_Guide_Magento_epoq_RS_1.0.0.pdf" hash="0227444742853b68a6f600404dc0a92d"/></dir><dir name="etc"><file name="cache.xml" hash="d3698a0b91a9aa83cca30b0f35b1270f"/><file name="config.xml" hash="2f42e79babe1ffd696f13e0af17ef349"/><file name="system.xml" hash="be045020f604fcb0fe73c086cea8d3f2"/></dir><dir name="Helper"><file name="Data.php" hash="2ea5098c3816538c0bf9de85677ac808"/></dir><dir name="Model"><dir name="Container"><file name="Product.php" hash="2d27e2460d55e78600851f1746dd9064"/><file name="TrackProduct.php" hash="cee44d8e817f19d7e8c98485d5ad740d"/></dir><dir name="Customer"><file name="Profiles.php" hash="fbedb6a3259a29db05b2c8783d02957b"/></dir><dir name="Recommendation"><file name="Abstract.php" hash="8ab50a9132dd79ecc0e216ccb326a5c2"/><file name="Cart.php" hash="fb66d1db5a156e7a89de52c4cfbc30ce"/><file name="Product.php" hash="48e2ea7bede7860e9b941352fb9ee456"/><file name="User.php" hash="549e3ba3efe4035c47a7a6c8b13eb39f"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Attemps.php" hash="c01ebd5c76fd4d51305ed7111326d57d"/><file name="Idletime.php" hash="957ec9d0c4af2d52add60a9765c4e573"/><file name="Timeout.php" hash="95c38625ad50dc44ba2b2d371de1db65"/></dir></dir></dir><file name="Abstract.php" hash="9a5eb8d02729fc106f5aa08ac9b700a7"/><file name="Observer.php" hash="6a8bfa71b605dcf37874542e1d721a87"/><file name="Session.php" hash="413f7d31ad2d5878f20a7db7adf5d207"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="epoqinterface.xml" hash="41bcb5bd071cde519b317aad3d8df8fb"/></dir><dir name="template"><dir name="epoqinterface"><dir name="recommendation"><file name="cart.phtml" hash="e3246573dda615454289ff1d39d1a172"/><file name="product.phtml" hash="a6daaf727c1d4b2db7a65772883725bf"/><file name="user.phtml" hash="0c5584382092f0b469d054d08297ba8b"/></dir></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="layout"><file name="epoqinterface.xml" hash="41bcb5bd071cde519b317aad3d8df8fb"/></dir><dir name="template"><dir name="epoqinterface"><dir name="recommendation"><file name="cart.phtml" hash="e3246573dda615454289ff1d39d1a172"/><file name="product.phtml" hash="a6daaf727c1d4b2db7a65772883725bf"/><file name="user.phtml" hash="0c5584382092f0b469d054d08297ba8b"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Flagbit_EpoqInterface.xml" hash="8ada99bfdbcc7727ad36339bc11da6ec"/></dir></target></contents>
|
21 |
<compatible/>
|
22 |
<dependencies/>
|
23 |
</package>
|