[*] MO : crossselling - moved javascript include into header hook.
This commit is contained in:
@@ -100,6 +100,7 @@ class CrossSelling extends Module
|
|||||||
public function hookHeader()
|
public function hookHeader()
|
||||||
{
|
{
|
||||||
$this->context->controller->addCSS(($this->_path).'crossselling.css', 'all');
|
$this->context->controller->addCSS(($this->_path).'crossselling.css', 'all');
|
||||||
|
$this->context->controller->addJS(($this->_path).'js/crossselling.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -25,8 +25,7 @@
|
|||||||
|
|
||||||
{if isset($orderProducts) && count($orderProducts)}
|
{if isset($orderProducts) && count($orderProducts)}
|
||||||
<div id="crossselling">
|
<div id="crossselling">
|
||||||
<script type="text/javascript">var middle = {$middlePosition_crossselling};</script>
|
<script type="text/javascript">var cs_middle = {$middlePosition_crossselling};</script>
|
||||||
<script type="text/javascript" src="{$content_dir}modules/crossselling/js/crossselling.js"></script>
|
|
||||||
<h2 class="productscategory_h2">{l s='Customers who bought this product also bought:' mod='crossselling'}</h2>
|
<h2 class="productscategory_h2">{l s='Customers who bought this product also bought:' mod='crossselling'}</h2>
|
||||||
<div id="{if count($orderProducts) > 5}crossselling{else}crossselling_noscroll{/if}">
|
<div id="{if count($orderProducts) > 5}crossselling{else}crossselling_noscroll{/if}">
|
||||||
{if count($orderProducts) > 5}<a id="crossselling_scroll_left" title="{l s='Previous' mod='crossselling'}" href="javascript:{ldelim}{rdelim}">{l s='Previous' mod='crossselling'}</a>{/if}
|
{if count($orderProducts) > 5}<a id="crossselling_scroll_left" title="{l s='Previous' mod='crossselling'}" href="javascript:{ldelim}{rdelim}">{l s='Previous' mod='crossselling'}</a>{/if}
|
||||||
|
|||||||
@@ -60,5 +60,5 @@ $(document).ready(function(){
|
|||||||
force:false,
|
force:false,
|
||||||
cycle:false
|
cycle:false
|
||||||
});
|
});
|
||||||
$('#crossselling_list').trigger( 'goto', [middle-3] );
|
$('#crossselling_list').trigger( 'goto', [cs_middle-3] );
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user