Jump to:

2082 Posts in 1002 Topics by 452 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Editing check out Page

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1015 Views
  • butterzz
    Avatar
    Community Member
    3 Posts

    Editing check out Page Link to this post

    im trying to change the sur name section to last name but cant find where to do this i am a beggining designer can any one point me in the right direction

  • supermegaultra
    Avatar
    Community Member
    33 Posts

    Re: Editing check out Page Link to this post

    Hi butterzz,

    Try editing OrderForm.php found in the ecommerce/code/ folder. There's reference to 'Surname' found on line 130 of that file.

    Hope that works!

  • Double-A-Ron
    Avatar
    Community Member
    604 Posts

    Re: Editing check out Page Link to this post

    Hi Butterz,

    Line 130 of Order.php actually refers to the required field names, which should stay as the are for validation purposes.

    If you are just wanting to change the label of the field, edit EcommerceRole.php line 75:

    function getEcommerceFields() {
          $fields = new FieldSet(
             new HeaderField('Personal Information', 3),
             new TextField('FirstName', 'First Name'),
             new TextField('Surname', 'Surname'),
             new TextField('HomePhone', 'Phone'),
             new TextField('MobilePhone', 'Mobile'),
             new EmailField('Email', 'Email'),
             new TextField('Address', 'Address'),
             new TextField('AddressLine2', ''),
             new TextField('City', 'City'),
             new DropdownField('Country', 'Country', Geoip::getCountryDropDown(), self::findCountry())
          );
          
          $this->owner->extend('augmentEcommerceFields', $fields);
          
          return new CompositeField($fields);
          
       }

    The first argument for each of those fields is the field name - these should stay as they are. The second argument can be changed and the label should change for you.

    E.G.

    function getEcommerceFields() {
          $fields = new FieldSet(
             new HeaderField('Personal Information', 3),
             new TextField('FirstName', 'First Name'),
             new TextField('Surname', 'Last Name'),
             new TextField('HomePhone', 'Phone'),
             new TextField('MobilePhone', 'Mobile'),
             new EmailField('Email', 'Email'),
             new TextField('Address', 'Address'),
             new TextField('AddressLine2', ''),
             new TextField('City', 'City'),
             new DropdownField('Country', 'Country', Geoip::getCountryDropDown(), self::findCountry())
          );
          
          $this->owner->extend('augmentEcommerceFields', $fields);
          
          return new CompositeField($fields);
          
       }

    Aaron

    1015 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.