| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Payment methods - Special instructions - HTML - call .tpl coding help | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Payment methods - Special instructions - HTML - call .tpl coding help
Hi Guys,
I have altered my Payment method as per fearnothing's excellent suggestion as at http://forum.x-cart.com/showthread.php?t=22197&page=4 article #37. Got the gif's showing fine and the HTML working great, however I would now like to do the following: Based on which currency the customer has selected (We have the Ruby Mods Currency mod) when the checkout page opens I would like the payment methods instructions for say Cheques to include a file to display. Along the lines of if $ruby_store_currency = GBP then display check_details_GBP.html (This page would show details and address for GBP cheques) if $ruby_store_currency = USD then display check_details_USD.html (This page would show details and address for USD cheques) etc etc. Could somebody point me in the right direction please? Many thanks in advance Nick
__________________
X-Cart Pro 4.7.12 Active and working great with reBOOT-reDUX X-Cart Pro 4.6.6 Retired after 6 years of first class service X-Cart Pro 4.1.7 Retired after 9 years of first class service Apache: 2.4.25 PHP: 7.4.5 MariaDB: 10.1.44 Arch: x86_64 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Payment methods - Special instructions - HTML - call .tpl coding help
You mean something like this:
Code:
(paymentid 16 is for cheque) Regards :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#3
|
|||||||
|
|||||||
Re: Payment methods - Special instructions - HTML - call .tpl coding help
Quote:
Hi, Thanks for that. The variable that we are using (have used it in other pages so I know that it is there) is $ruby_store_currency which can be either "GBP" or "USD". So using your above example I change your code to: - {if $ruby_store_currency eq GBP} {include file="skin1/modules/Fast_Lane_Checkout/itvv_pay.tpl"} {/if} If I paste your code into the Payment method : Special instructions : Cheques in Admin and then view the checkout page as a customer it just displays that whole code section i.e. {if $ruby_store_currency eq GBP} {include file="skin1/modules/Fast_Lane_Checkout/itvv_pay.tpl"} {/if} Is this because I have changed the page to display HTML? Many thanks and kind regards Nick
__________________
X-Cart Pro 4.7.12 Active and working great with reBOOT-reDUX X-Cart Pro 4.6.6 Retired after 6 years of first class service X-Cart Pro 4.1.7 Retired after 9 years of first class service Apache: 2.4.25 PHP: 7.4.5 MariaDB: 10.1.44 Arch: x86_64 |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Payment methods - Special instructions - HTML - call .tpl coding help
Yes ... if it's a .html page you're showing it wont understand smarty code.
Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#5
|
|||||||
|
|||||||
Re: Payment methods - Special instructions - HTML - call .tpl coding help
Quote:
Thanks, Any suggestions or thoughts on how I might achieve this? Regards Nick
__________________
X-Cart Pro 4.7.12 Active and working great with reBOOT-reDUX X-Cart Pro 4.6.6 Retired after 6 years of first class service X-Cart Pro 4.1.7 Retired after 9 years of first class service Apache: 2.4.25 PHP: 7.4.5 MariaDB: 10.1.44 Arch: x86_64 |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Payment methods - Special instructions - HTML - call .tpl coding help
Not 100% sure ... Using javascript is a possibility maybe ?
Is there a reason to why you're displaying the page in .html formar rather than in .tpl ? Regards Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#7
|
|||||||
|
|||||||
Re: Payment methods - Special instructions - HTML - call .tpl coding help
Hi Guys,
Just to explain a little more about the mod I did to the Checkout page. I did the mod as per Fearnothing's excellent suggestion at http://forum.x-cart.com/showthread.php?t=22197&page=4 article #37. This mod allows you to use the "Special Instructions" box on the Payment meathods page in Admin to display .gif images of credit cards as per the following screen shot contained in the attachment xcart-payment-001.jpg. Notice the Visa and MasterCard gif's along with the PayPal gif. What I am trying to do is write some code for the "Cheque" payment method that takes the value of $ruby_store_currency and then displays information in that box based on the currency set, along the following lines: - {if $ruby_store_currency eq GBP} {include file="skin1/modules/Fast_Lane_Checkout/GBP_pay.tpl"} {if $ruby_store_currency eq USD} {include file="skin1/modules/Fast_Lane_Checkout/USD_pay.tpl"} {/if} In the above example if $ruby_store_currency = GBP it would include a file called GBP_pay.tpl with the following HTML code: - Please make cheque payable to anycompany.com and send to: - Anycompany.com Any Street Road Any Town Any Country Any Zip Code UK Cheques must be in Pound Sterling In the next example if $ruby_store_currency = USD it would include a file called USD_pay.tpl with the following HTML code: - Please make cheque payable to anycompany.com and send to: - Anycompany.com Any Street Road Any Town Any Country Any Zip Code United States Cheques must be in United States Dollars But when I click on "Checkout" as in the first step to complete your order and are taken to the Payment Method screen, the url shows: - https://whatevercompany.com/cart.php?mode=checkout All I am getting is the actual code that I have written in the Cheque (Admin - Payment Methods - Special instructiosn box) box, as contained in the attachment xcart-payment-002.jpg Any thoughts on how I can achieve this please? Many thanks in advance and kind regards to all Nick
__________________
X-Cart Pro 4.7.12 Active and working great with reBOOT-reDUX X-Cart Pro 4.6.6 Retired after 6 years of first class service X-Cart Pro 4.1.7 Retired after 9 years of first class service Apache: 2.4.25 PHP: 7.4.5 MariaDB: 10.1.44 Arch: x86_64 |
|||||||
#8
|
|||||||||
|
|||||||||
Re: Payment methods - Special instructions - HTML - call .tpl coding help
I've never actually used this mod before ...
Been looking and wondering if the following will help: - Open up /skin1/customer/main/checkout.tpl - Find the following line: Code:
- Replace with the following: Code:
Hope this helps ? Regards Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#9
|
|||||||
|
|||||||
Re: Payment methods - Special instructions - HTML - call .tpl coding help
Quote:
Hi Shafiq :sK, Tried your code/mod but the page displays nothing - no errors or anything. Any other thoughts? Thanks again for your help and time. Regards Nick
__________________
X-Cart Pro 4.7.12 Active and working great with reBOOT-reDUX X-Cart Pro 4.6.6 Retired after 6 years of first class service X-Cart Pro 4.1.7 Retired after 9 years of first class service Apache: 2.4.25 PHP: 7.4.5 MariaDB: 10.1.44 Arch: x86_64 |
|||||||
#10
|
|||||||
|
|||||||
Re: Payment methods - Special instructions - HTML - call .tpl coding help
Hi Shafiq,
Please find attached my checkout.tpl as per you pm. Hope that you can shed some light on this as I am now confused!! Once again many thanks for your help and time on this. Kind regards Nick
__________________
X-Cart Pro 4.7.12 Active and working great with reBOOT-reDUX X-Cart Pro 4.6.6 Retired after 6 years of first class service X-Cart Pro 4.1.7 Retired after 9 years of first class service Apache: 2.4.25 PHP: 7.4.5 MariaDB: 10.1.44 Arch: x86_64 |
|||||||
|
|||
X-Cart forums © 2001-2020
|