Jigoshop Support - Marcin
Forum Replies Created
-
Hello,
You will have to create a class which implements the PageInterface interface. Something along the lines of the below:<?php use Jigoshop\Helper\Render as RenderCore; use Jigoshop\Frontend\Page\PageInterface; use Jigoshop\Integration\Helper\Render; class MySettings implements PageInterface { function __construct() { Render::addLocation('my_settings_Plugin', my_settings_DIR); add_action('init', function () { add_rewrite_endpoint("my_settings", EP_ROOT | EP_PAGES | EP_PERMALINK); add_filter('generate_rewrite_rules', function ($rewrite) { $mySettings = [ '^account/my_settings/?$' => 'index.php?pagename=my_settings' ]; $rewrite->rules = $mySettings + $rewrite->rules; return $rewrite->rules; }); flush_rewrite_rules(); }); add_filter('jigoshop.frontend.page_resolver.page', function ($args) { global $wp_query; if ($wp_query->query['pagename'] == 'my_settings') { return $this; } return $args; }); } public function action() { $this->renderMySettings(); } public function render() { } public function renderMySettings() { RenderCore::output('layout/ defautlt', [ 'content' => Render::get('my_settings_Plugin', 'my_settings_template', $args) ]); exit; } }
Replace “my_settings” with your preferred plugin name. “my_settings_Plugin” will be your plugin’s name, “my_settings_DIR” is your plugin’s directory. “my_settings_template” is the name of the rendered template without the “.php” suffix.
- This reply was modified 6 years, 5 months ago by Jigoshop Support - Marcin.
- This reply was modified 6 years, 5 months ago by Jigoshop Support - Marcin.
Forum: Plugins
In reply to: [Jigoshop eCommerce] How to set a character limit to product title?Please contact us at [email protected], so that I can debug the issue.
Forum: Plugins
In reply to: [Jigoshop eCommerce] How to set a character limit to product title?Correction:
add_filter(‘jigoshop\find\product’, function($product) {
if(\Jigoshop\Frontend\Pages::isProductCategory()) {
$product->setName(substr($product->getName(),0,X -1));
}
return $product;
}, 10, 2);Forum: Plugins
In reply to: [Jigoshop eCommerce] How to set a character limit to product title?add_filter('jigoshop\find\product', function($product) { if(\Jigoshop\Frontend\Pages::isProductCategory()) { $product->setName(substr($product->getName(),0,X -1)) } return $product; }, 10, 2);
Where X is your desired length.
Forum: Plugins
In reply to: [Jigoshop eCommerce] Table shipping import/exportHi Jackie,
Please contact us at [email protected], since I might need to debug this issue prior to providing you with an answer.Forum: Plugins
In reply to: [Jigoshop eCommerce] How to set a character limit to product title?Hello,
Do you mean it should crop titles longer than X, or not allow them to be entered at all?Forum: Plugins
In reply to: [Jigoshop eCommerce] Broken Layout after 2.1.17 migrationHello,
Please contact us at [email protected] – this is not a known issue and I might have to debug it prior to answering your question/resolving the issue.Forum: Plugins
In reply to: [Jigoshop eCommerce] Entries will not be transmittedAdd the
[customer_note]
variable to the e-mail (it’s located in Jigoshop -> Emails).Forum: Plugins
In reply to: [Jigoshop eCommerce] Displaying Variable ProductsWell, it would, but implementing such a display mechanism would inherently be problematic, at the very least. You can assign attributes to specific categories, though, so I’d look into that ??
Forum: Plugins
In reply to: [Jigoshop eCommerce] From date to dateHi,
We’re in the process of creating a booking extension compatible with Jigoshop eCommerce. Could you elaborate a bit more on what you’re trying to do at the moment, so that I can suggest a workaround?Forum: Plugins
In reply to: [Jigoshop eCommerce] Jigoshop compatible with Woocommerce?I’m quite sure they would interfere with each other quite a bit. It would be better to run a second WordPress installation on a subdomain of the current shop.
Forum: Plugins
In reply to: [Jigoshop eCommerce] Displaying Variable ProductsWouldn’t it be better to use these attributes as categories, and the products as simple products?
Forum: Plugins
In reply to: [Jigoshop eCommerce] screenreader accessibilityWe’ll consider adding your suggestion to the next release ??
Forum: Plugins
In reply to: [Jigoshop eCommerce] Displaying Variable ProductsHello,
This sounds exactly like a simple product. Why would you want to use a variable product for that?Forum: Plugins
In reply to: [Jigoshop eCommerce] How do I set and assign price levels to users?Sure, I forgot that you were a translation contributor. A coupon code has been sent to you via e-mail ??