Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    help question Help with Adding an extra Description Line under Payment Method Options:

    Hi,
    I'm running Zen Cart 1.5.7c on PHP 7.4 with Responsive Classic template, using IH5, OPC & Bank Deposit plugins.
    Please see attached image (https://i.imgur.com/P2NTLk6.jpg).
    I would like to add a line UNDER the "Pay via Bank line".
    How do I do that?
    I played around with different options and no luck!
    Also, if anyone is wondering, I do not want to add it to the Pay via Bank line..", I would like to add a second line.
    Thanking you in advance.
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

  2. #2
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Help with Adding an extra Description Line under Payment Method Options:

    Ok, I managed to add a line, but can't figure out how adjust it to sit correctly under the "Pay with bank.." line.

    I added this line:
    define('MODULE_PAYMENT_DIRBANKAUS_TEXT_EXTRA', '<p style="color:sienna; font-size: 9px;"><em>Bank Details will be included in your Order Confirmation Email.</em></p>');
    at the end of my (/includes/languages/english/modules/payment/dirbankaus.php).

    Then I added this around line 45 in (/includes/templates/template_default/templates/tpl_modules_opc_payment_choices.php)..
    <div id="bankdeposit"><?php echo MODULE_PAYMENT_DIRBANKAUS_TEXT_EXTRA; ?></div>
    ...UNDER this line...
    (<p class="important"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></p>)..

    But couldn't get it to display where I want it!!
    This is a snapshot of how it looks without css editing: https://i.imgur.com/UpDVtrL.png

    And now this is how it looks like when I added some stuff in the .css: https://i.imgur.com/whdNCk1.png

    HOWEVER, doing the Position: Absolute put it where I want it, but it has Stopped the radio button from functioning (Can't choose it)!

    So I need to figure out another way to place it where I want!?
    Hope at least I made it easier from someone to help me now!
    Last edited by rlexyd; 30 Aug 2021 at 03:35 AM.

  3. #3
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: Help with Adding an extra Description Line under Payment Method Options:

    In your payment module, you can add a $description variable which will automagically be displayed.

    Here are snippets from my modified bank payment module, for you to include the "description" references/compare to yours.

    class moneyorder {
    var $code, $title, $description, $enabled;
    then

    $this->code = 'moneyorder';
    $this->title = MODULE_PAYMENT_MONEYORDER_TEXT_TITLE;
    $this->description = MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION;
    then

    function selection() {
    return array('id' => $this->code,
    'module' => $this->title . '<img ' . MODULE_PAYMENT_MONEYORDER_ICON_IMG . ' alt="' . MODULE_PAYMENT_MONEYORDER_ICON_ALT . '" title="' . MODULE_PAYMENT_MONEYORDER_ICON_TITLE . '" />',
    'description' => $this->description
    /* these fields are also available for automatic output, left here for reference
    ,'fields'=>array(array(
    'tag' =>"pmt-" . $this->code,//for label
    'title' => 'MODULE_PAYMENT_MONEYORDER_TEXT_ICON',//constants not defined
    'field' => 'MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION'))//constant not defined
    */
    );
    }
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  4. #4
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Help with Adding an extra Description Line under Payment Method Options:

    Thank you Steve, very much appreciate your help!
    After working on this for many days, finally it worked I think.

    These codes where already in the dirbankaus.php file:

    class dirbankaus{
    var $code, $title, $description, $enabled;
    &
    $this->code = 'dirbankaus';
    $this->title = MODULE_PAYMENT_DIRBANKAUS_TEXT_TITLE;
    $this->description = MODULE_PAYMENT_DIRBANKAUS_TEXT_DESCRIPTION;

    But the Description wasn't showing, just the module name would appear.

    As for the Function Selection, this code was already there:

    function selection() {
    return array('id' => $this->code,
    'module' => $this->title);
    }


    So I just adjusted it to this by looking at your code:

    function selection() {
    return array('id' => $this->code,
    'module' => $this->title . '<center><span class="smallText"><span style="color: sienna;"<i><em>Bank Details will be included in your Order Confirmation Email.</i></em></span></center><div id="bankpayment"><img src="images/bankpayment.png" alt="Pay with Bank Deposit" title="Pay with Bank Deposit" /></div>');
    }

    Now I can see the extra line as I wanted thanks to you
    https://i.imgur.com/3vNdDxK.png

    I am having trouble adjusting it to the position and styling I wanted but this will do the job for now.
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

  5. #5
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: Help with Adding an extra Description Line under Payment Method Options:

    function selection() {
    return array('id' => $this->code,
    'module' => $this->title . '<center><span class="smallText"><span style="color: sienna;"<i><em>Bank Details will be included in your Order Confirmation Email.</i></em></span></center><div id="bankpayment"><img src="images/bankpayment.png" alt="Pay with Bank Deposit" title="Pay with Bank Deposit" /></div>',
    'description'=>$this->description

    );
    }
    Your code is missing the additional array element 'description' where it uses $this->description.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  6. #6
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Help with Adding an extra Description Line under Payment Method Options:

    Quote Originally Posted by torvista View Post
    Your code is missing the additional array element 'description' where it uses $this->description.
    Thanks again Steve,
    I added that last bit as you advised but I didn't see any change though. (should I have?)
    Cheers,

 

 

Similar Threads

  1. Options Under Product Description?
    By gabstero in forum General Questions
    Replies: 2
    Last Post: 9 May 2014, 10:01 PM
  2. Adding html tables to product description adds extra line breaks
    By ndknsrln in forum Templates, Stylesheets, Page Layout
    Replies: 17
    Last Post: 4 Mar 2013, 12:35 AM
  3. Replies: 2
    Last Post: 11 May 2008, 03:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR