Author Topic: Add Messages to payment page using RCI  (Read 2184 times)

0 Members and 1 Guest are viewing this topic.

David M. Graham

  • Administrator
  • Sr. Member
  • *****
  • Offline Offline
  • Posts: 380
  • Karma: 12
    • View Profile
    • osCommerce University
Re: Add Messages to payment page using RCI
« Reply #5 on: March 16, 2009, 10:57:56 AM »
Adding messages to the pages themselves is independent of modules.

You can however, wrap the code above in a conditional test for module status.

Example:
Code: [Select]


if (defined('MODULE_CHECKOUT_SUCCESS_PRODUCTS_KEYS_STATUS') &&  MODULE_CHECKOUT_SUCCESS_PRODUCTS_KEYS_STATUS == 'True') {
// Change to test for config keys for Print Key and Email Key selections

... Some code here ...

}

The codes to check can be found in the target modules code file within the appropriate modules/ subdirectory.

David


Liquid

  • Newbie
  • *
  • Offline Offline
  • Posts: 14
  • Karma: 2
    • View Profile
Re: Add Messages to payment page using RCI
« Reply #4 on: March 15, 2009, 05:10:03 PM »
Wow, I thought you were primarily a Cre Loaded guy given your attention and knowledge.

Could you give an example of how to use the RCI system to add verbiage to the checkout process using Paypal Payflow Pro "Pay by Credit Card" module?


David M. Graham

  • Administrator
  • Sr. Member
  • *****
  • Offline Offline
  • Posts: 380
  • Karma: 12
    • View Profile
    • osCommerce University
Re: Add Messages to payment page using RCI
« Reply #3 on: November 05, 2008, 07:49:04 AM »
Actually,  I have considered it. 

While it is not impossible that I will do so, I plan to release books on osCommerce and EOS first. 

While I still have some interest in CRE Loaded, for a number of reasons it simply does not offer enough of a return on my investment.  As most of my savings went into Chain Reaction before the split, I really have little choice but to focus into areas where I can earn a living first.

Perhaps after that, I will return to the next volume on CRE Loaded.



David

Destron

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
  • Karma: 1
    • View Profile
Re: Add Messages to payment page using RCI
« Reply #2 on: November 04, 2008, 03:16:31 PM »
                       Hello David,

I have a question regarding the RCI coding format?I know at one point(Or so i've heard)that you was working on a volume 2 to the Inside CRE loaded series in which would have explain more in regards to the templating system as well as perhaps on the RCI / RCO coding add-on system.

Why am i asking this?Although i know that you're not with CRE anymore at the moment...i was wondering if you have considered,at some point in the future, releasing documentation of this work that would expand upon more in-depth coverage that can help those that would want to advance their knowledge in understanding CRE templating fundamentals and porting/creating over modules/contributions that can enhance functionality using the RCI/RCO method(On a personal note...I would love to see more RCI code examples as this is what i'm more interested in at the given moment).

 I do have your first book(paperback version)and i'm very impressed with the collective work...but ask this because perhaps there was information that can be  vital in reaching this comprehensive goal that just didn't make it's way into published format.

 Any chance on this being a possibility?I would love to hear your thoughts on this. ;D

                                                                                                    Thanks,
                                                                                                    Destron

David M. Graham

  • Administrator
  • Sr. Member
  • *****
  • Offline Offline
  • Posts: 380
  • Karma: 12
    • View Profile
    • osCommerce University
Add Messages to payment page using RCI
« Reply #1 on: November 04, 2008, 08:59:28 AM »
At times, it is helpful to add additional language to various payment pages in places where language does not exist.

Previously,the only alternative was to edit the template files directly - but these files are prone to overwrite  when installing patches.

The RCI system offers some interesting possibilities there, provided you are careful not to prematurely output to the web.

Here are two example files which, when placed in your catalog/includes/runtime/checkout_payment directory (create this if it does not exist).

AUTHNET_checkout_payment_insideformabovebuttons.php

Code: [Select]
<?php 
$rci 
'<tr><td>'"\n";
$rci .= '<h1>Press Continue to Confirm Your Order</h1>'"\n";
$rci .= '<p>You can shop online at www.OurSplendidSite.com with confidence. All payments are processed via PCI compliant secure connections.  For your protection, we verify your cards <b>Billing address</b>. You must have JavaScript enabled to use this site.</p>'"\n";
$rci .= '</td></tr>' "\n";
return 
$rci;
?>



AUTHNET_checkout_payment_insideformbelowbuttons.php

Code: [Select]
<?php 
$rci 
'<tr><td>'"\n";
$rci .= '<h1>In the event you experience difficulty processing your card,</h1>'"\n";
$rci .= '<h1>Please contact us Toll Free: (8**) ***-****</h1>'"\n";
$rci .= '<h1>We will be happy to assist you in processing your order.</h1>'"\n";
$rci .= '</td></tr>' "\n";
return 
$rci;
?>


Note that the code does not echo or print to the screen, it simply builds a string and returns it.  Also important is the form of the HTML - which in each of these cases must be a complete table row or rows.