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

A simple fix to pretty the checkout up a little

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #31  
Old 06-28-2006, 09:29 PM
 
cwill2200 cwill2200 is offline
 

Senior Member
  
Join Date: Jun 2006
Posts: 137
 

Default

fearnothing can you tell us where and what code you added to get this look. I have been looking at trying to do this myself.

Thank you!
__________________
cwill2200
X-Cart Gold 4.0.18
FreeBSD
Reply With Quote
  #32  
Old 06-29-2006, 02:59 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

Quote:
Originally Posted by fearnothing
On a related theme ...

In trying to improve the look of the checkout process, I would like to see icons included for each payment method.

If you try to modify the 'Special Instructions' in the payment methods section in admin to include HTML code, when you press 'update' the HTML is deleted. Now if you edit the field directly in phpMyAdmin to include HTML naturally it saves okay.

This is an actual screen dump of how it looks with the IMG tags included by hacking it through phpMyAdmin:

http://www.smartchoicemusic.com/downloads/payment-method-screen-dump.gif

I've removed the tags now in case there is a good reason (?) for this behaviour.

Does anyone have any thoughts on this - maybe this has been covered elsewhere?

it would certainly brighten up the payment options ....


its a security thing...

there is a list of trusted variables / scripts etc

if you add this to that list you should be ok.

the same thing would strip html from various other forms

not sure where the post is youll have to have a hunt around
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #33  
Old 06-29-2006, 11:42 AM
 
fearnothing fearnothing is offline
 

Senior Member
  
Join Date: Jun 2005
Location: North East England
Posts: 124
 

Default

Hmmm.

Thanks for that Shan. I have searched the forum using 'trusted variables', and there are few posts but mostly relating to using markup in 'Extra Fields'.

It's at this point where I have to admit that I'm getting out of my depth. I think the relevant PHP file is admin/payment_methods.php but beyond that I cannot see what needs to be done to add this variable to the trusted list.

The field that needs to be freed up to accept HTML is 'payment_details' within the 'payment_methods' table (cwill2200 - this is where I added the <IMG> tag to get the CC logos to appear using PHPMyAdmin).

If no-one comes up with an answer in the next few days I'll use up a few support points and ask the X-Cart crew.
__________________
www.smartchoicemusic.com
Smart Choice Music - Import CD and DVD Specialists
4.6.0
MySQL 5.5.34
PHP 5.4.24
Apache/2.2.26
Multiple homegrown and paid-for mods
Reply With Quote
  #34  
Old 07-05-2006, 04:07 PM
 
MCM MCM is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 114
 

Default

What a great mod... the old checkout page to new is incomparable. I did make a few changes, though...

The changes:
1- Add personal details
2- "Americanize" the address, bringing city/state/zip onto one line

Here's how it looks:

http://www.moderncoinmart.com/skin1/images/checkout.jpg



Here's the new, full code for sexy-customer-details.tpl:

Code:
{* $Id: sexy_customer_details.tpl,v 1 2006/06/01 15:15:52 max Exp $ *} <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div class="sidebox"> <div class="boxhead"><h2>{$lng.lbl_personal_information}</h2></div> <div class="boxbody"> [b]{if $userinfo.default_fields.firstname}{$userinfo.firstname} {if $userinfo.default_fields.lastname}{$userinfo.lastname}{/if}{/if} {if $userinfo.default_fields.phone} {$lng.lbl_phone}: {$userinfo.phone} {/if} {if $userinfo.default_fields.fax} {$lng.lbl_fax}: {$userinfo.fax} {/if} {if $userinfo.default_fields.email} {$lng.lbl_email}: {$userinfo.email}{/if} </td> <td></td> </tr> <tr> <td><div class="sidebox"> <div class="boxhead"><h2>{$lng.lbl_billing_address}</h2></div> <div class="boxbody"> {if $userinfo.default_fields.firstname}{$userinfo.b_firstname}{if $userinfo.default_fields.lastname} {$userinfo.b_lastname}{/if}{/if} {if $userinfo.default_fields.b_address}{$userinfo.b_address}{/if}{if $userinfo.b_address_2} {$userinfo.b_address_2}{/if} {if $userinfo.default_fields.b_city}{$userinfo.b_city}, {/if} {if $userinfo.default_fields.b_state}{$userinfo.b_statename} {/if} {if $userinfo.default_fields.b_zipcode}{$userinfo.b_zipcode} {/if} {if $userinfo.default_fields.b_country}{$userinfo.b_countryname} {/if} </div> </div></td> <td><div class="sidebox"> <div class="boxhead"><h2>{$lng.lbl_shipping_address}</h2></div> <div class="boxbody"> {if $userinfo.default_fields.firstname}{$userinfo.s_firstname}{if $userinfo.default_fields.lastname} {$userinfo.s_lastname} {/if}{/if} {if $userinfo.default_fields.s_address}{$userinfo.s_address} {/if} {if $userinfo.s_address_2} {$userinfo.s_address_2} {/if} {if $userinfo.default_fields.s_city}{$userinfo.s_city}, {/if} {if $userinfo.default_fields.s_state}{$userinfo.s_statename} {/if} {if $userinfo.default_fields.s_zipcode}{$userinfo.s_zipcode} {/if} {if $userinfo.default_fields.s_country}{$userinfo.s_countryname} {/if} </div> </div></td> </tr> </table>


Again, thanks so much for the great mod!
__________________
Version 4.0.17/4.0.18
Reply With Quote
  #35  
Old 07-05-2006, 05:05 PM
 
cwill2200 cwill2200 is offline
 

Senior Member
  
Join Date: Jun 2006
Posts: 137
 

Default

Love this, thank you! If the gray doesn't match our site would there be a way to edit the colors or would I need to just redo images and replace them in the code?
__________________
cwill2200
X-Cart Gold 4.0.18
FreeBSD
Reply With Quote
  #36  
Old 07-05-2006, 05:33 PM
 
MCM MCM is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 114
 

Default

Quote:
Originally Posted by cwill2200
Love this, thank you! If the gray doesn't match our site would there be a way to edit the colors or would I need to just redo images and replace them in the code?
Since they're images, I believe you'd have to just redo the images. An easy way is to go into a good photo editing program and just select a color range and replace the colors with ones that match your site.

Jeremy
__________________
Version 4.0.17/4.0.18
Reply With Quote
  #37  
Old 07-06-2006, 12:24 PM
 
fearnothing fearnothing is offline
 

Senior Member
  
Join Date: Jun 2005
Location: North East England
Posts: 124
 

Default

An update to the images in the Payment Methods fields in admin, courtesy of our good friends the X-Cart Men:

Code:
If you would like to add HTML tags to the "payment_details" field you should open admin/payment_methods.php file and replace in it: require "./auth.php"; with define('USE_TRUSTED_POST_VARIABLES',1); $trusted_post_variables = array("posted_data"); require "./auth.php"; Those changes do not introduce any security risk, because the list of the payment methods can be changed by x-cart store administrator only.

It works a treat, and the descriptors in 'Payment Methods' now accept HTML.

So you would need to add this into the field before any text:

[img]../yourlocation/skin1/images/payment_xxxx.gif[/img]


(I Haven't tried using the Image Location variable, but this works and keeps the SSL intact)

You'll obviously need some GIF files - the ones I have used in my store (with white background, not transparent) are available here:

Visa and Mastercard

Amex and Diners

Paypal

Cheque (Check)

And if you prefer to mess around with them yourself, this should do the trick:

Photoshop PSD file in layers

I've updated the screen shots in the earlier posts to reflect exactly how it looks as of now.
__________________
www.smartchoicemusic.com
Smart Choice Music - Import CD and DVD Specialists
4.6.0
MySQL 5.5.34
PHP 5.4.24
Apache/2.2.26
Multiple homegrown and paid-for mods
Reply With Quote

The following 2 users thank fearnothing for this useful post:
photo (03-18-2009), Warwick (01-07-2014)
  #38  
Old 07-06-2006, 02:38 PM
  NightFire's Avatar 
NightFire NightFire is offline
 

X-Adept
  
Join Date: Jul 2004
Location: The Netherlands
Posts: 561
 

Default

Wow nice fix fearnothing

What really does the trick if this thing will accept language variables. Then you can place your html tags into the language variables, and also your payments methods descriptions are multilanguage.
Thanks for the fix anyway, it gives me an idea where to start.

Using language variables wouldn't mess up all the code of html and normal text. And also the imagedir variable works etc.
__________________
Best regards,
Niki Buitenrust Hettema

X-Cart Gold 4.1.8 (Live & Loaded)
Royal Bhaktapur: Handmade products from Nepal - Pashmina's, scarfs, shawls, stola's and more...
Reply With Quote
  #39  
Old 07-06-2006, 08:30 PM
 
taltos1 taltos1 is offline
 

Senior Member
  
Join Date: Mar 2005
Location: USA
Posts: 160
 

Default

Quote:
Originally Posted by fearnothing
An update to the images in the Payment Methods fields in admin, courtesy of our good friends the X-Cart Men:....

I just did this, excellent mod, Thanks a lot for the update!
__________________
X-Cart Gold Version 4.0.18
EWDHosting.com is my Host
Unix Servers
Reply With Quote
  #40  
Old 07-07-2006, 06:43 AM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default

Quote:
Originally Posted by fearnothing
So you would need to add this into the field before any text:

[img]../yourlocation/skin1/images/payment_xxxx.gif[/img]


I am not sure where the above line is supposed to be inserted?
Is it to go into my line "Visa or Mastercard" in the Payment method screen in Admin?
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 11:21 AM.

   

 
X-Cart forums © 2001-2020