jxdyzwh Posted October 22, 2013 Share Posted October 22, 2013 i use http://doc.prestashop.com/display/PS15/Creating+a+PrestaShop+module example,but my test result Not the same as with the example , my result css and tpl is error, how can i use the example model(now i use model append .tpl in {l s='Hello %s!' sprintf=$my_module_name mod='mymodule'} ) Link to comment Share on other sites More sharing options...
jxdyzwh Posted October 22, 2013 Author Share Posted October 22, 2013 vekia,can you help me Link to comment Share on other sites More sharing options...
vekia Posted October 22, 2013 Share Posted October 22, 2013 what kind of error you've got? in this case please turn on error reporting and just paste error code here Link to comment Share on other sites More sharing options...
jxdyzwh Posted October 22, 2013 Author Share Posted October 22, 2013 {** 2007-2012 PrestaShop** NOTICE OF LICENSE** This source file is subject to the Academic Free License (AFL 3.0)* that is bundled with this package in the file LICENSE.txt.* It is also available through the world-wide-web at this URL:* http://opensource.org/licenses/afl-3.0.php* If you did not receive a copy of the license and are unable to* obtain it through the world-wide-web, please send an email* to [email protected] so we can send you a copy immediately.** DISCLAIMER** Do not edit or add to this file if you wish to upgrade PrestaShop to newer* versions in the future. If you wish to customize PrestaShop for your* needs please refer to http://www.prestashop.com for more information.** @author PrestaShop SA <[email protected]>* @copyright 2007-2012 PrestaShop SA* @version Release: $Revision: 6664 $* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)* International Registered Trademark & Property of PrestaShop SA*}{*** Retro compatibility for PrestaShop version < 1.4.2.5 with a recent theme*}{* Two variable are necessaries to display the address with the new layout system *}{* Will be deleted for 1.5 version and more *}{if !isset($multipleAddresses)} {$ignoreList.0 = "id_address"} {$ignoreList.1 = "id_country"} {$ignoreList.2 = "id_state"} {$ignoreList.3 = "id_customer"} {$ignoreList.4 = "id_manufacturer"} {$ignoreList.5 = "id_supplier"} {$ignoreList.6 = "date_add"} {$ignoreList.7 = "date_upd"} {$ignoreList.8 = "active"} {$ignoreList.9 = "deleted"} {* PrestaShop < 1.4.2 compatibility *} {if isset($addresses)} {$address_number = 0} {foreach from=$addresses key=k item=address} {counter start=0 skip=1 assign=address_key_number} {foreach from=$address key=address_key item=address_content} {if !in_array($address_key, $ignoreList)} {$multipleAddresses.$address_number.ordered.$address_key_number = $address_key} {$multipleAddresses.$address_number.formated.$address_key = $address_content} {counter} {/if} {/foreach} {$multipleAddresses.$address_number.object = $address} {$address_number = $address_number + 1} {/foreach} {/if}{/if}{* Define the style if it doesn't exist in the PrestaShop version*}{* Will be deleted for 1.5 version and more *}{if !isset($addresses_style)} {$addresses_style.company = 'address_company'} {$addresses_style.vat_number = 'address_company'} {$addresses_style.firstname = 'address_firstname'} {$addresses_style.lastname = 'address_name'} {$addresses_style.address1 = 'address_address1'} {$addresses_style.address2 = 'address_address2'} {$addresses_style.city = 'address_city'} {$addresses_style.country = 'address_country'} {$addresses_style.phone = 'address_phone'} {$addresses_style.phone_mobile = 'address_phone_mobile'} {$addresses_style.alias = 'address_title'}{/if}<script type="text/javascript">//<![CDATA[ {literal} $(document).ready(function() { resizeAddressesBox(); }); {/literal}//]]></script>{$HOOK_leftColumn}<br>{l s='Hello %s!' sprintf=$my_module_name mod='mymodule'}{capture name=path}<a href="{$link->getPageLink('my-account', true)}">{l s='My account'}</a><span class="navigation-pipe">{$navigationPipe}</span>{l s='My addresses'}{/capture}{include file="$tpl_dir./breadcrumb.tpl"}<div class="wht_bg"> <div class="wrap_indent">{if isset($multipleAddresses) && $multipleAddresses}<div class="addresses"> <h3>{l s='Your addresses are listed below.'}</h3> {assign var="adrs_style" value=$addresses_style} <table id="address-list" class="std"> <thead> <tr> <th class="first_item">{l s='lastname'}</th> <th class="item">{l s='city'}</th> <th class="item">{l s='address'}</th> <th class="item">{l s='tel'}</th> <th class="item">{l s='operating'}</th> </tr> </thead> {foreach from=$multipleAddresses item=address name=myLoop} <tr> <td class="history_date bold">{$address.formated['lastname'|replace:',':'']|escape:'htmlall':'UTF-8'}</td> <td class="history_date bold">{$address.formated['city'|replace:',':'']|escape:'htmlall':'UTF-8'}</td> <td class="history_date bold">{$address.formated['address1'|replace:',':'']|escape:'htmlall':'UTF-8'}</td> <td class="history_date bold">{$address.formated['phone'|replace:',':'']|escape:'htmlall':'UTF-8'} {$address.formated['phone_mobile'|replace:',':'']|escape:'htmlall':'UTF-8'}</td> <td class="history_date bold"><a href="{$link->getPageLink('address', true, null, "id_address={$address.object.id|intval}")}" title="{l s='Update'}">{l s='Update'}</a> <a href="{$link->getPageLink('address', true, null, "id_address={$address.object.id|intval}&delete")}" onclick="return confirm('{l s='Are you sure?'}');" title="{l s='Delete'}">{l s='Delete'}</a></td> </tr> {/foreach} </table> <p class="clear" /></div>{else} <p class="warning">{l s='No addresses available.'} <a href="{$link->getPageLink('address', true)}">{l s='Add new address'}</a></p>{/if}<div class="clear address_add"><a href="{$link->getPageLink('address', true)}" title="{l s='Add an address'}" class="button_large">{l s='Add an address'}</a></div><ul class="footer_links"> <li><a href="{$link->getPageLink('my-account', true)}"><img src="{$img_dir}icon/my-account.gif" alt="" class="icon" /> {l s='Back to your account'}</a></li> <li class="f_right"><a href="{$base_dir}"><img src="{$img_dir}icon/home.gif" alt="" class="icon" /> {l s='Home'}</a></li></ul></div></div> Link to comment Share on other sites More sharing options...
vekia Posted October 22, 2013 Share Posted October 22, 2013 this is error code? Link to comment Share on other sites More sharing options...
jxdyzwh Posted October 22, 2013 Author Share Posted October 22, 2013 {$HOOK_leftColumn} {l s='Hello %s!' sprintf=$my_module_name mod='mymodule'} result is the css tpl is error Link to comment Share on other sites More sharing options...
vekia Posted October 22, 2013 Share Posted October 22, 2013 the css tpl is error what error? im still waiting for this info Link to comment Share on other sites More sharing options...
stottycabanas Posted October 22, 2013 Share Posted October 22, 2013 I don't think it's an error that would get picked up by turning error reporting on. The 'error' is that the results achieved were not as expected. In the original post, 'Click me' is underlined in red, maybe it's something to do with that? jxdyzwh, can you provide more explanation of what is not appearing as you expect, and also a link to your site. Link to comment Share on other sites More sharing options...
Recommended Posts