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

Customizing 'submit' button depending on page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-24-2008, 11:00 AM
  tqualizerman's Avatar 
tqualizerman tqualizerman is offline
 

X-Adept
  
Join Date: Jun 2008
Posts: 392
 

Default Customizing 'submit' button depending on page

Hi All,

I'm trying to customize the text shown on the 'submit' button. Specifically, I am trying to show different text on the submit button during hte checkout process. Example, I want to show at the bottom of the profile page 'Go to Step 3' or 'Proceed to Shipping and Payment'

I've figured out the hard way to do this by creating a set of TPL's for each button, but surely there's a better way to code this.

I noticed some code,

{if $js_enabled and $usertype eq "C"}
{include file="buttons/submit.tpl" type="input" style="button" href="javascript: return check_registerform_fields(); return false;"}
{else}
<input type="submit" value=" {$lng.lbl_nextstep|strip_tags:false|escape} " />
{/if}

in the else statement where it seems fairly easy to substitute the tag shown on the submit button, but I can't figure out how to make it work in the if statement without disrupting the registration check.

Any advice?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World
- Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com)


X-Cart Version 4.1.10
Reply With Quote
  #2  
Old 06-24-2008, 11:19 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Customizing 'submit' button depending on page

Since "buttons/submit.tpl" uses "buttons/button.tpl" have you tried using that instead and adding "button_title=$lng.lbl_submit_1 style="button" directly? You would have to make language variables for lbl_submit_1, lbl_submit_2, lbl_submit_3, etc. but it should get what you want although it may actually be easier to make buttons/submit_1.tpl, buttons/submit_2.tpl etc. which you may have to do anyway. I hope this helps... although I have my doubts

I just made $lng.lbl_submit say "Submit and Continue"
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
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 02:25 AM.

   

 
X-Cart forums © 2001-2020