EasyCart Child Themes and Layouts

What is a EasyCart Child Theme and Child Layout?

Beginning in version 3 of the WP EasyCart, we offer developers the option to keep the latest theme and child files up to date automatically as the plugin upgrades without having to manually upload the latest store theme and store layout! This is a great option to help developers keep their clients’ stores up to date and functional at a single click of the button. With this great new feature we know developers still need the ability to override certain files, images, css, etc… In order to make the store customized for their specific project (a great example of this is customizing the email receipt). This is where a child layout becomes an extremely important feature! Child themes and layouts allow you to specify a child theme or layout folder in which you can place individual files to override a specific functionality of the store, while simultaneously allowing your theme and layout to keep the latest features for the rest of store.

How Does the Store Find a Layout or Theme File?

Every file loaded from the design folder of your shopping cart system goes through the following check to find the correct file:

  1. Does the file exists in the plugins folder at wp-easycart-data/design/layout/{your selected child layout}/file.php?
  2. If not, use the latest file in the wp-easycart/design/layout/base-reponsive-v3/file.php

This applies exactly the same to the theme folder and can be useful for specifying a custom image not found file.

How to Set Up and Specify a Child Design

Setting up and specifying a child theme or child layout is quick and easy! First, add a new folder in the wp-easycart-data/design/layout/ folder (something like my-custom-layout) and repeat this for the wp-easycart-data/design/theme/ folder. Next, go to the WordPress Admin -> EasyCart Admin -> Store Setup -> Design File Management and select your newly added custom theme and/or layout folders in the drop down boxes. That is it! Your store will now look first in your custom child theme folder and next to the latest files in the main plugin. To override any files you should first copy the file you are editing to your custom theme folder and make your corrections there (custom changes should be in the wp-easycart-data folder).