-
Posts
1,080 -
Joined
-
Last visited
-
Days Won
17
Everything posted by dotnetic
-
Hi @adrian thanks for this great module. I want to always show the "Send welcome message" field/checkbox for new users, that I create in the admin. But this checkbox never shows. I filled out the email-address but it still does not show up. I unchecked the option "Automatic Email Send" in the modules settings, because I want to choose if a user should get a welcome email or not. Could this be because of the core version of PW that I am using? I am using 3.0.71 right now. I turned on ProcessWire debug now, and EmailNewUser triggers an error: Trying to get property of non-object in K:\xampp\htdocs\myproject\src\site\assets\cache\FileCompiler\site\modules\EmailNewUser\EmailNewUser.module on line 54 That line reads if ($this->wire('page')->process == "ProcessUser") $this->addHookAfter('ProcessPageEdit::buildFormContent', $this, 'addEmailFields'); I think the problem is $this->wire('page')->process == "ProcessUser" but I am not sure. Any suggestions?
-
Hi @tpr. Do you know how to set another theme for Codemirror? If I use it, my HTML source code becomes unreadable of the theme (which seems to be moono-lisa).
-
Maybe Magento 2 in conjunction with ProcessWire will fit your needs. Take a look at the post where I contributed a possible solution to get this working. If there are more people who are working with this approach, we get a nice bridge between the two systems.
- 3 replies
-
- 1
-
-
- performance
- eshop
-
(and 1 more)
Tagged with:
-
You can also include (bootstrap) ProcessWire into Magento.
-
Hi @pandaman For one of my customers I made some basic experiments to connect the both systems together. Your arguments are valid. I also told him to combine the best of two worlds and let each system do what it's best for. What I can say right now, it is possible, but there might be pitfalls, that I didn't discover yet. One problem was the session management which caused conflicts so you have to modify it. Right now I have the following working solution (PW 3 and Magento 2.1): I installed Magento 2.1 in a "store" directory that lies right beside site and wire directories. I made a magento2-bridge.php in site/templates/ <?php namespace ProcessWire; require $_SERVER['DOCUMENT_ROOT'] . '/store/app/bootstrap.php'; use Magento\Framework\App\Bootstrap; class StoreApp { private static $instance; public static function get_instance() { if ( ! isset(self::$instance) && ! (self::$instance instanceof StoreApp) ) { self::$instance = new StoreApp(); } return self::$instance; } public $helper; public $quote; public $session; public $cart; public $customer; private function __construct() { $bootstrap = Bootstrap::create(BP, $_SERVER); $obj = $bootstrap->getObjectManager(); $state = $obj->get('Magento\Framework\App\State'); $state->setAreaCode('frontend'); $this->customer = $obj->get('Magento\Customer\Model\Session')->getCustomer(); $this->quote = $obj->get('Magento\Checkout\Model\Session')->getQuote(); $this->helper = $obj->get('\Magento\Checkout\Helper\Cart'); $this->session = $obj->get('Magento\Checkout\Model\Session'); $this->cart = $obj->get('\Magento\Checkout\Model\Cart'); } } I had to modify the session management in Magento, so it stores its session variables in ProcessWires directory. I hope I remember this correctly: Change the Cookie Path in Magento @ Stores -> Configuration -> Web -> Defaut Cookie Settings to "/" (without the quotes) Change the save_path for sessions under store/app/etc/env.php 'session' => array ( 'save' => 'files', 'save_path' => $_SERVER['DOCUMENT_ROOT'].'/site/assets/sessions', At some point I changed the sessionAllow parameter of ProcessWire, but I don´t know if this is needed anymore. But for completeness, here is the code I used: $config->sessionAllow = function () { if (strpos($_SERVER['REQUEST_URI'], '/processwire/') === 0) { return true; } return false; }; Then in my site/templates/home.php I have the following code, to get data from Magento (like Customer data, what is in the cart, product information): require_once __DIR__ .'/magento2-bridge.php'; $store = StoreApp::get_instance(); $quote = $store->helper->getQuote(); $quoteitems = $quote->getAllItems(); $customer = $store->customer; bd($customer->getName()); foreach ($quoteitems as $item) { // Code to get contents per product bd($item->getName()); bd($item->getQty()); } If you are wondering what bd() means. It is a debugging output from Tracy Debugger for ProcessWire (recommended install). Why do I share this information here although it was very time-consuming and expensive to figure this out? Because I had great support from the PW community and want to give something back. If you make any progress with this, please try to do the same and share your findings with our lovely community.
- 8 replies
-
- 13
-
-
I want to trigger an action when I save my custom module configuration. Right now, I got the following code which is not working: public function ready() { $this->addHookAfter('Modules::saveConfig', $this, 'afterSave'); } public function afterSave() { $this->message("saved module config"); // Also I need the saved module settings here } I also need the values of the module configuration after saving, so I can trigger an action. Any ideas?
-
Changelog support in ProcessWireUpgrade module
dotnetic replied to szabesz's topic in Wishlist & Roadmap
+1 Displaying a changelog before upgrading a module or even the core is badly needed. Also the changelog should be visible everytime on a module detail page. -
@ryan Right now the view that shows translation files "Setup > Languages > German" is not very intuitive and confuses users and translators, because they are confronted with cryptic names (Textdomains) instead of clear to read names. How can we make it better? Add clear to read labels like the module name from modules and the filename without the path from other files (.php). The path information has to be more subtle, as it is not that important for most users Take a look at the first two entries compared to the lower two. This can be done very quickly by adding some styles. Either flexbox or floats would do the job. Here is what I did (just quick and dirty and not the best way) Changed order of the file path to last. Added CSS to InputfieldFileLanguageFilename description: <span class="InputfieldFileLanguageFilename description" style=" position: absolute; right: 0; padding-right: 10px; font-size: 13px; color: #ccc; ">/site/templates/main.php</span> What you think of that?
-
@tpr With the new tablecellselection.js it works In my eyes, the Lightwire skin looks nicer than the default skin. Especially the design of the dropdowns and the icons. Can´t you update the default skin so it uses your styles? Maybe even publish it on the ckeditor.com site. The changes are subtle but noticable.
-
Hello @tpr I have a problem with Pro Fields: Table in conjunction with AdminOnSteroids. If I use the Table Cells Selection Plugin or the Lightwire skin, the editing of the fields does not work as expected. I attached a screen-capture (with audio) to show the problem. I can export the fields if you want to recreate this. pro-fields-table-adminonsteroids.mp4
-
Yes, i try to support all filterboxes. Sadly right now I am busy with some projects. Hope I find the time to finish this soon.
-
Hey @tpr, I am working on some modifications so that the quick-filter works with ProcessWire´s design philosophy. Right now I got it working for AdminThemeDefault and AdminThemeReno. I am working on AdminThemeUikit compability, which needs some markup modifications. I attached some actual screenshots (AdminThemeUikit is stilll work in progress, so not the final output). What do you think of these modifications? Are you interested in merging them if I create a pull request?
-
@Salemoche Obviously this is the same question you asked on http://stackoverflow.com/questions/43854601/css-is-not-updating-in-processwire. Maybe give me an upvote there if my solution helps you. Here is my answer again: This is most likely a problem with caching. Please read https://varvy.com/pagespeed/leverage-browser-caching.html for example, to understand what browser caching is and what task it accomplishes. On this page under "Common caching issue" you find your problem. If you are using Chrome, open the Dev Tools (F12) and under the Network tab check "Disable cache". In Firefox open the Firefox Toolbox (also F12) and under Settings > Advanced settings check "Disable HTTP-Cache if Toolbox is open" (I translated this from a german Firefox). After that make changes in your CSS file and reload the page. If your changes appear then you know you stumbled into one of the pitfalls of browser-caching. There are many strategies to deal with this "problem". Take a look at https://css-tricks.com/strategies-for-cache-busting-css/ for some solutions.
-
@Nico Knoll Wenn du mir die Zugangsdaten gibst, würd ich das sogar ändern.
-
@nickie Any update or showcase for the site?
-
I think the two modules should be merged, as they both serve module specific tasks.
-
Another problem, or maybe THE problem is, that you seem to not have GD lib installed. As you can see on https://processwire.com/about/requirements/ this is required. Install it, and I think your problem is gone.
-
It seems like a permission problem with uploaded files so ProcessWire can´t access them.
-
According to your information it seems your file is uploaded. Where is the image not visible? In the admin (backend) or frontend?
-
Although Robin S´s module might "hide" the menu entry it is still accessible if you know the URL. To restrict non-superusers and redirect them to another page after logging in, you need to do it different. I wrote a module for that case which you can find at https://github.com/jmartsch/ProcessRestrictTreeMenu. It is not configurable yet, but you can change the code in the .module file.
-
@Nico Knoll Push
-
How to add own tab in Admin on edit page via API?
dotnetic replied to dotnetic's topic in API & Templates
@kixe Your solution works perfectly fine. Thank you a thousand times Kudos! Thanks to @adrian as well. -
How to add own tab in Admin on edit page via API?
dotnetic replied to dotnetic's topic in API & Templates
Is there a way to add custom markup to the tab via fields? Then I could do it the way you described. -
How to add own tab in Admin on edit page via API?
dotnetic replied to dotnetic's topic in API & Templates
I want to do this programmatically. Because I want to add custom markup like some buttons. I don´t want to add inputs to the tab. -
I want to add a tab to an edit page in the admin via API. I found a code from @kixe here https://processwire.com/talk/topic/15015-tabs-in-module-config-page/?do=findComment&comment=134624 that basically does this, but I can´t get it to work correctly (see screenshot). As you can see the Tab has a weird name and the submit button appears before the fieldset. Also the tab should appear as second, directly after "Inhalt (content)". Maybe I did something wrong when adding the tab to the form? Here is the code that I used: public function ready() { $this->addHookAfter('ProcessPageEdit::buildForm', $this, 'addButtons'); } public function addButtons($event) { $page = $event->object->getPage(); if ($page->template == "bewerbung") { $form = $event->return; $inputfields = new InputfieldWrapper(); $tab = new InputfieldWrapper(); $tab->attr('title', 'Settings'); $tab->attr('class', 'WireTab'); $markup = $this->modules->get('InputfieldMarkup'); $markup->label = 'Settings'; $markup->value = '<p>Just a placeholder for some inputfields.</p>'; $tab->add($markup); $inputfields->add($tab); $form->add($inputfields); } }