devilsown Posted December 15, 2012 Share Posted December 15, 2012 (edited) On http://www.devilsown...oller=order-opc at the very bottom of order-opc.tpl i have this {include file="$tpl_dir./restpage.tpl"} which puts the header information on the page. I have my page loading content first then all the other stuff. i had no issues having this work on 1.4 x i am upgrading the site now to 1.5 and its running the script twice. If i take out the include i don't get the code ran. If i put it in the last line. its ran twice. Anyone got an idea on how to do a include once with smarty etc. I have this being included on ever page of the site. Its being included on the very bottom line. {if $opc} {assign var="back_order_page" value="order-opc.php"} {else} {assign var="back_order_page" value="order.php"} {/if} {if $PS_CATALOG_MODE} {capture name=path}{l s='Your shopping cart'}{/capture} <h2 id="cart_title">{l s='Your shopping cart'}</h2> <p class="warning">{l s='Your new order was not accepted.'}</p> {else} <script type="text/javascript"> // <![CDATA[ var imgDir = '{$img_dir}'; var authenticationUrl = '{$link->getPageLink("authentication", true)}'; var orderOpcUrl = '{$link->getPageLink("order-opc", true)}'; var historyUrl = '{$link->getPageLink("history", true)}'; var guestTrackingUrl = '{$link->getPageLink("guest-tracking", true)}'; var addressUrl = '{$link->getPageLink("address", true, NULL, "back={$back_order_page}")}'; var orderProcess = 'order-opc'; var guestCheckoutEnabled = {$PS_GUEST_CHECKOUT_ENABLED|intval}; var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}'; var currencyRate = '{$currencyRate|floatval}'; var currencyFormat = '{$currencyFormat|intval}'; var currencyBlank = '{$currencyBlank|intval}'; var displayPrice = {$priceDisplay}; var taxEnabled = {$use_taxes}; var conditionEnabled = {$conditions|intval}; var countries = new Array(); var countriesNeedIDNumber = new Array(); var countriesNeedZipCode = new Array(); var vat_management = {$vat_management|intval}; var txtWithTax = "{l s='(tax incl.)'}"; var txtWithoutTax = "{l s='(tax excl.)'}"; var txtHasBeenSelected = "{l s='has been selected'}"; var txtNoCarrierIsSelected = "{l s='No carrier has been selected'}"; var txtNoCarrierIsNeeded = "{l s='No carrier is needed for this order'}"; var txtConditionsIsNotNeeded = "{l s='No terms of service must be accepted'}"; var txtTOSIsAccepted = "{l s='Terms of Service have been accepted'}"; var txtTOSIsNotAccepted = "{l s='Terms of service have not been accepted'}"; var txtThereis = "{l s='There is'}"; var txtErrors = "{l s='error(s)'}"; var txtDeliveryAddress = "{l s='Delivery address'}"; var txtInvoiceAddress = "{l s='Invoice address'}"; var txtModifyMyAddress = "{l s='Modify my address'}"; var txtInstantCheckout = "{l s='Instant checkout'}"; var txtSelectAnAddressFirst = "{l s='Please start by selecting an address'}"; var errorCarrier = "{$errorCarrier}"; var errorTOS = "{$errorTOS}"; var checkedCarrier = "{if isset($checked)}{$checked}{else}0{/if}"; var addresses = new Array(); var isLogged = {$isLogged|intval}; var isGuest = {$isGuest|intval}; var isVirtualCart = {$isVirtualCart|intval}; var isPaymentStep = {$isPaymentStep|intval}; //]]> </script> {if $productNumber} <!-- Shopping Cart --> {include file="$tpl_dir./shopping-cart.tpl"} <!-- End Shopping Cart --> {if $isLogged AND !$isGuest} {include file="$tpl_dir./order-address.tpl"} {else} <!-- Create account / Guest account / Login block --> {include file="$tpl_dir./order-opc-new-account.tpl"} <!-- END Create account / Guest account / Login block --> {/if} <!-- Carrier --> {include file="$tpl_dir./order-carrier.tpl"} <!-- END Carrier --> <!-- Payment --> {include file="$tpl_dir./order-payment.tpl"} <!-- END Payment --> {else} {capture name=path}{l s='Your shopping cart'}{/capture} <h2>{l s='Your shopping cart'}</h2> <p class="warning">{l s='Your shopping cart is empty.'}</p> {/if} {/if} {include file="$tpl_dir./restpage.tpl"} Edited December 15, 2012 by devilsown (see edit history) Link to comment Share on other sites More sharing options...
devilsown Posted December 17, 2012 Author Share Posted December 17, 2012 As anyone else had issue with this page loading "extra code" twice. Link to comment Share on other sites More sharing options...
devilsown Posted December 19, 2012 Author Share Posted December 19, 2012 TTT anyone have a helping hand for this? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now