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)
-   -   Edit Fast Lane Checkout to show images instead of text (https://forum.x-cart.com/showthread.php?t=42470)

fireflight 09-19-2008 01:29 PM

Edit Fast Lane Checkout to show images instead of text
 
I've gone through the forums and files trying to figure out how to do this.

Our client wants to replace the text on the Shipping and Payment page "modules/Fast_Lane_Checkout/checkout_2_method.tpl" with images of the credit cards or payment methods. So instead of saying "Visa, Mastercard, American Express" the $payment.payment_details variable would show the logos of those three.

The payment methods admin page lets me edit the text, but doesn't allow me to add HTML to link to the correct images for each of the payment methods. Is there any way to do this with the fast lane checkout? Or am I out of luck on this one?

JWait 09-20-2008 08:05 AM

Re: Edit Fast Lane Checkout to show images instead of text
 
Well, the payment methods are in a loop in the Fast_Lane_Checkout module, and the text is displayed using the {$payment.payment_details} variable. You can add an image in checkout _2_method.tpl, but I think you would need to add another loop with a "if" to display the "credit cards" image only where it applies, and I have no idea what the correct payment.payment_details variable is. I don't think you can get a individual image to display for each credit card easily though since it is from a pulldown menu in checkout _3_place.tpl.

fireflight 09-22-2008 05:49 AM

Re: Edit Fast Lane Checkout to show images instead of text
 
I was afraid of that. The client is looking for a separate image for each payment method. Once I saw that loop, I had a bad feeling about it.

Would there be an easy way to allow HTML into the special instructions fields in the admin area? Could I edit the admin pages template/php to allow html to be added?

fireflight 09-22-2008 09:05 AM

Re: Edit Fast Lane Checkout to show images instead of text
 
Well. I figured it out after some thinking. In the checkout_2_method.tpl file. I changed the line:
Code:

<td width="80%">{$payment.payment_details}</td>

to

Code:

<td width="80%"><img src="{$ImagesDir}/pm{$payment.paymentid}.png" align="right" alt="{$payment.payment_method}"/>{$payment.payment_details}</td>

Each payment method has a unique id, so I had to name the images using that id number (ex. pm1.png)


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

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