X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   submit_wo_js.tpl (https://forum.x-cart.com/showthread.php?t=44109)

conradp24 12-08-2008 07:06 AM

submit_wo_js.tpl
 
Apologies in advance if posted in the wrong area.

My "Add to Cart" and "Buy now" buttons don't work after I've disabled javascript in Firefox (or any other browser) I was under the impression that this template was used for submitting without javascript?

Enlightment welcome

conradp24

Victor D 12-08-2008 11:42 PM

Re: submit_wo_js.tpl
 
Yes, this template outputs standart button for submitting the form instead of pretty lookin one and notice that javascript is disabled.
For all the buttons to work properly without javascript they have to be placed in tempates on the following scheme (following is only pseudocode):

Code:

{if js enabled}
{include file="buttons/some_button.tpl"....}
{else}
{include file="submit_wo_js.tpl"...}
{/if}



But not all the buttons in original skin are implemented this way.

conradp24 12-09-2008 11:18 AM

Re: submit_wo_js.tpl
 
Okay from the submit_wo_js.tpl can you explain this to me:

<input type="submit" value="{$value|strip_tags:false|escape}" /><br />

particularly what is meant by the |escape on the end?

I'm fairly sure that my buttons worked with javascript disabled and now they don't. If I can understand this code a bit better I might be able to fathom it.

Many thanks,

Conradp24

Victor D 12-10-2008 12:04 AM

Re: submit_wo_js.tpl
 
the words started with | are the Smarty modifiers so you can find it on page http://smarty.net/manual/en/language.modifiers.php
$value|escape will escape all special html charactetrs: & " ' < > * in variable with name value


All times are GMT -8. The time now is 05:46 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.