Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying PrestaShop Module Development
  • Table Of Contents Toc
PrestaShop Module Development

PrestaShop Module Development

By : Serny
4.5 (15)
close
close
PrestaShop Module Development

PrestaShop Module Development

4.5 (15)
By: Serny

Overview of this book

If you are a developer who is new to PrestaShop and wants to get a good foundation in development on the PrestaShop framework, this book is for you. It's assumed that you will have some experience with PHP5, jQuery, and HTML/CSS (no need to be an expert on it).
Table of Contents (13 chapters)
close
close
12
Index

Updating the MySQL table of the module


We will now update the code of the mymodcomments module to make it compliant with the multistore feature. Don't get confused; by default, your module will work perfectly with the feature enabled, but you will not use the full potential of this feature. The comments on your products will be associated with all your shops.

We will now create an update file (refer to Chapter 4, Building Module Updates, if you don't remember how it works) to add the id_shop field in the mymod_comments table.

First, update your module's version (remember, updates are applied depending on the module version):

$this->version = '0.3';

The version will then become:

$this->version = '0.4';

Now, create the upgrade/install-0.4.php file:

// Update method for version 0.4 of mymodcomments module
function upgrade_module_0_4($module)
{
  // Execute module update MySQL commands
  $sql_file = dirname(__FILE__).'/sql/install-0.4.sql';
  if (!$module->loadSQLFile($sql_file))
    return...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
PrestaShop Module Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon