If doumentation does not cover your questions or have more to ask / share with other product users or get reply from Official Support then feel free to ask / share on CodeShop Amazon Affiliate plugin Forum.

Advanced Template Customizations

To customize your templates in more detail you need to know little more about PHP, including basic knowledge of HTML and CSS. Hope you know already about basic template customization through documentation page.

Using Different Products Display Templates

We have known detail about all template structures using customize templates documentation. As we know we have main three standard template files -

  • homepage.php
  • single-amazonproductshop.php
  • archive-amazonproductshop.php
The above main three standard template files load dynamically other template files which are usually called products display template files and this templates display your added products in your website. Currently we have four available products display template files -
  • product-one-column.php - has own stylesheet in assets/css/product-two-columns.css
  • product-two-columns.php - has own stylesheet in assets/css/product-two-columns.css
  • product-three-columns.php - has own stylesheet in assets/css/product-three-columns.css
  • product-four-columns.php - has own stylesheet in assets/css/product-four-columns.css
All products display templates have their own stylesheet so you can update corresponding stylesheet to change your products display look as you want.

As en example if you want to display products as three columns view of your Codeshope homepage since as default there shows four columns view, so you need to open 'homepage.php' and then find coding lines -

        // Caaps_Template_Helper::caaps_load_template('product-one-column.php');
        // Caaps_Template_Helper::caaps_load_template('product-two-columns.php');
        // Caaps_Template_Helper::caaps_load_template('product-three-columns.php');
As PHP double back slashes '//' mean codes are commented or disabled so the last coding line works for us to display products as default four columns view and which has template file name as parameter is 'product-four-columns.php'. Other coding lines are commented just to show you if you want to active other coding lines instead of last coding line which shows four columns view. So if you just change products display template file name in paramater then that template file will be loaded to display your products. So as we mentioned above if we want to display products three columns view then just comment or disabled the last coding line and active three columns view coding line as -
        // Caaps_Template_Helper::caaps_load_template('product-one-column.php');
        // Caaps_Template_Helper::caaps_load_template('product-two-columns.php');
        // Caaps_Template_Helper::caaps_load_template('product-four-columns.php');
So now your products on CodeShop homepage will be shown as three columns view. You can do same way to display other products column view. Always you just need to keep active one coding line mentioned above which you want to use. So the process is same for other two main standard template files single-amazonproductshop.php (display all posts pages products) and archive-amazonproductshop.php (display all category pages products) which has same coding lines just keeping active one coding line and commenting or disabling others. You can do same way to active other coding lines what you want to make work.

Customizing Products Display Templates

We know currently we have four available products display templates mentioned above with their corresponding stylesheet. So if you want to change the view of products display by updating HTML and CSS then you need to update products display template file with their corresponding stylesheet. Say if you want to update two columns products display template file then you need to work on 'product-two-columns.php' template file and its corresponding CSS file 'assets/css/product-two-columns.css'. You can change whatever works best with your active theme. You can usually use your own HTML tags with their own classes what is working with your active theme to create the same look with your active theme.