[*] MO : crossselling - moved javascript include into header hook.

This commit is contained in:
Damon Skelhorn
2012-12-18 11:52:25 +00:00
parent 7869a43d16
commit 403ce760b2
3 changed files with 3 additions and 3 deletions
+1
View File
@@ -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');
} }
/** /**
+1 -2
View File
@@ -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}
+1 -1
View File
@@ -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] );
}); });