Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » help - trying to add new textarea field to ecommerce checkout page?

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1479 Views
  • podge
    Avatar
    Community Member
    6 Posts

    help - trying to add new textarea field to ecommerce checkout page? Link to this post

    Hi there,

    I'm trying to add a new field to the checkout page. I can insert the new textarea field ok, but i can't get the contents to appear in the confirmation page or the sent email.

    If anyone can point me in the right direction, i'd really appreciate it. I'm not a php expert!

    I am using a version of the higherground template, and have done the following:

    In ecommercerole.php:

    added the following in function extraDBFields() {:

    'RentalDateNotes' => 'HTMLText'

    added the following in

    function getEcommerceFields() {
    new TextareaField('RentalDateNotes', 'Please let us know what dates you require the equipment'),

    then did a db build,

    Then in the confirmation page - in themes/themename/templates\Includes\OrderInformation.ss, i have placed the following:

    <tr class="summary">
             <td colspan="3" scope="row" class="left">Notes</td>
             <td class="price">$RentalDateNotes</td>
          </tr>

    I've tried a number of different things, including rebuilding the db, and flushing the cache, but still cannot get the contents of

    $RentalDateNotes

    to appear in the email or confirmation page.

    what am i missing here?
    Any ideas?
    thanks in advance

    1479 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.