Book Image

PrestaShop Module Development

By : Fabien Serny
Book Image

PrestaShop Module Development

By: Fabien Serny

Overview of this book

Table of Contents (19 chapters)
PrestaShop Module Development
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Updating the module code


We have updated the mymod_comment table with the three new fields; we now have to update the code of the module to use these fields. I won't explain this part in detail since it's not very difficult and there is nothing new here. You can take the module attached with this chapter if you want to skip this part. In displayProductTabContent.tpl, add the following HTML fields in the form:

<div class="form-group">
  <label for="firstname">
    {l s='Firstname:' mod='mymodcomments'}
  </label>
  <div class="row"><div class="col-xs-4">
    <input type="text" name="firstname" id="firstname" class="form-control" />
  </div></div>
</div>
<div class="form-group">
  <label for="lastname">
    {l s='Lastname:' mod='mymodcomments'}
  </label>
  <div class="row"><div class="col-xs-4">
    <input type="text" name="lastname" id="lastname" class="form-control" />
  </div></div>
&lt...