TruthWear Apparel
Forum Replies Created
-
Forum: Plugins
In reply to: [WP-Spreadplugin] Shop personalisation or add themeHi Yarne,
Yes, that’s the idea. Thimo created an excellent plugin and you can create an extension to customize it however you like.
A basic example to customize the product detail page is below. The extended plugin overrides the regular spreadplugin function displayDetailPage and it make all product pages display only the phrase “hello!” with no actual product info.
<?php require_once dirname(__DIR__)."/wp-spreadplugin/spreadplugin.php"; if(class_exists('WP_Spreadplugin')) { class WP_SpreadpluginMOD extends WP_Spreadplugin { /** * Class constructor */ public function __construct() { parent::__construct(); } // functions to override below protected function displayDetailPage($id, $article, $backgroundColor = '') { return "hello!"; // or whatever layout } } new WP_SpreadpluginMOD(); // create the plugin instance } ?>You will need to refer Thimo’s plugin displayDetailPage function to see what lines you need to copy over to your overridden functions to get the right information and add in your own html and css customizations to get the look you want. You might need to override other functions from Thimo’s spreadplugin to get the effects you want.
You can also add your own functions to create custom features for your site. For example, in the github link, there is code that creates a shortcode for the shopping cart that enables me to add the shopping cart to any page on my website.
I hope that’s enough to get you started.
Cheers
Forum: Plugins
In reply to: [WP-Spreadplugin] Shop personalisation or add themeHi Yarne,
I’m not sure how familiar you are with PHP programming, but you can basically make your own plugin that extends Thimo’s plugin. In your own plugin, you override the methods he uses with your own version to get the custom layout you want.
You can visit my shop as an example
https://truthwearapparel.com/shopI’ve uploaded the extended plugin here to github as a reference for others:
https://github.com/truthwearapparel/spreadpluginMODIt’s not an official WordPress plugin (so you can’t search for it in new plugins for WordPress) and it most likely won’t work on your site. There is also no support. It’s there as a reference to help you get an idea of what functions you might want to change to get the custom look you desire.
Cheers
Forum: Plugins
In reply to: [WP-Spreadplugin] Custom Layout ModI’ve updated to the newest version and I didn’t need to do any manual changes anymore.
Thanks for your support!