Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

submit_wo_js.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-08-2008, 07:06 AM
 
conradp24 conradp24 is offline
 

Advanced Member
  
Join Date: Oct 2007
Posts: 83
 

Default 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
__________________
Conradp24
X-Cart 4.1.12 CentOS Linux
Reply With Quote
  #2  
Old 12-08-2008, 11:42 PM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default 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.
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
  #3  
Old 12-09-2008, 11:18 AM
 
conradp24 conradp24 is offline
 

Advanced Member
  
Join Date: Oct 2007
Posts: 83
 

Default 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
__________________
Conradp24
X-Cart 4.1.12 CentOS Linux
Reply With Quote
  #4  
Old 12-10-2008, 12:04 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default 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
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:06 AM.

   

 
X-Cart forums © 2001-2020