-
Posts
76 -
Joined
-
Last visited
Spinbox's Achievements
Sr. Member (5/6)
43
Reputation
-
I'm not sure in what version it happened but you commented out a function (RockPageBuilder.module.php:200 addAlfredIcons()) for repeaterpages, that's called when using alfredH().
-
Hi @bernhard, what is the reason for disabling addAlfredIcons / alfredH($item)? The function is still being used in the example blocks.
-
@seddass, thanks. I have removed the variants and added them back for this instance. I'll wait and see what Kongondo has to say. I changed the version number to 11 π€ͺ (No, testing webhook payment π₯° )
-
Hi @kongondo, I'm not sure if this worked before or it is broken since updating. If I have a product that already has some variants, I can't seem to 'regenerate' additional variants. The button does not show. Could you check if this is the case? (I'm on version 11) Next to that I'm also getting Uncaught TypeError: Cannot read properties of null (reading 'length') from Inputfieldtextags.js when I have more then 1 Attribute selected.
-
Great stuff! I had some problems when having FormBuilderProcessorStripe installed. It couldn't find the module's file. I just removed the module completly so can't give any more insights.
-
Thanks Francis, Works wonderfully. I noticed the flat amount is without tax. I would expect it to be included with tax. Both for the end user and the customer. Right now if I set 10,- off, it will actually be 12,1 off. Is this intended behavior?
-
I'm having a little trouble setting up the discount feature. I'm using is_custom_form, I tried adding a discount field to the form, but withouth success . Does anybody have this working already? @alexm maybe? Any pointers are welcome.
-
Hi @kongondo, We are experiencing a lot of problems with orders that result in 500 errors after payment has been done and user is being redirected to the shop. First a couple but now very frequently. I found out this happens when users go to the website inside Facebook for example. They buy a product and get redirected to their default browser. (Usually the client is being redirected to their bank app) The browser is not aware of the session and the order is not being updated. This also happens when a user uses another browser then the default. Using 009 and Stripe as payment provider. I believe this is where it happens; Cannot instantiate abstract class ProcessWire\PadloperPayment TraitPadloperProcessOrderCaptureOrder.php:18 $this->setPaymentProvider($this->session->paymentProviderID); I hope you can help me with this issue.
-
Hi @kongondo, I have a repeaterfield on my product template. When I enable product variants the JS for InputfieldRepeater will trigger based on 'InputfieldRepeaterItem' class, causing errors and the variant's content gets hidden. InputfieldPadloperRuntimeMarkup.module // @note @kongondo: we need this class 'InputfieldRepeaterItem' so InputfieldImage.js will read the ajax postUrl from our data-editUrl here $wrap->addClass('InputfieldPadloperRuntimeMarkupItem InputfieldNoFocus InputfieldRepeaterItem'); You have any ideas to prevent this? (I'd rather not change Fieldtype Repeater module itself, which I have done in the meanwhile)
- 1 reply
-
- 1
-
Any progress on this?
-
Hi @kongondo, You have added some nice shortcuts to view the products. Is there a way to add a custom filter to these shortcuts. Or have it set by get variables? I have repetitive products which are locked when it's replaced by a new one. I'm trying to hide locked products since the list is getting pretty long. Thanks,
-
Thank you for your reply. First of all, I'm more of a frontender, which could lead to not providing all the things you would like too. Sorry if this leads to unclear questions. Learning each day though. I'm happy to provide a PR but the problem is I'm not sure if I'm right or what I'm doing is the right 'way', or let's say I'm not that confident. What I want to achieve This is what I'm trying to achieve, by adding functions/extensions/filters to twig. <h2>{{translate('Articles','General')}}</h2> <p>{{page.article_date|format_datetime(pattern="d MMMM yyyy")}}</p> Suggestion My suggestion is to have a separate function to load twig (just like Latte is loaded right now), like mentioned in my previous post. This hook would then be able to add these extensions etc. $this->wire()->addHookAfter('RockFrontend::loadTwig', function (HookEvent $event) { /** @var \Twig_Environment $twig */ $twig = $event->return; // Adding custom Twig extensions, functions, and filters $twig->addExtension(new IntlExtension()); $twig->addFunction(new \Twig\TwigFunction('translate', function ($text, $context = "General") { return _x($text, $context, config()->urls->templates . 'language/translations.php'); })); $twig->addFilter(new \Twig\TwigFilter('html_entity_decode', 'html_entity_decode')); $twig->addFilter(new \Twig\TwigFilter('base64_encode', 'base64_encode')); $twig->addFilter(new \Twig\TwigFilter('base64_decode', 'base64_decode')); $twig->addFunction(new \Twig\TwigFunction('bd', function ($dump) { bd($dump); })); // Return the modified Twig environment $event->return = $twig; }); I'm not sure how this would work. My first thought are that I have to copy the contents of this function into a hook and then change the part where it was going to call the renderFileTwig(). That seems like it's prone to errors if the module gets updates but I could be wrong. Any pointers in how to approach this would be welcome.
-
I used to use TemplateEngine with Twig, where I could hook into twig to add extensions and functions. Is it possible to make it hookable? Right now we can use Twig, but very limited, or am I wrong? Perhaps changing to current function /** * Twig renderer */ protected function renderFileTwig($file, $vars) { try { require_once $this->wire->config->paths->root . 'vendor/autoload.php'; $loader = new \Twig\Loader\FilesystemLoader($this->wire->config->paths->root); $twig = new \Twig\Environment($loader, [ 'debug' => true, ]); $twig->addExtension(new \Twig\Extension\DebugExtension()); $relativePath = str_replace( $this->wire->config->paths->root, $this->wire->config->urls->root, $file ); $vars = array_merge((array)$this->wire('all'), $vars); return $twig->render($relativePath, $vars); } catch (\Throwable $th) { return $th->getMessage() . '<br><br>Use composer require "twig/twig:^3.0" in PW root'; } } to something similar like the Latte renderer /** * Twig renderer */ protected function renderFileTwig($file, $vars) { $twig = $this->loadTwig(); if (!$twig) throw new WireException("Unable to load Twig"); $vars = array_merge((array)$this->wire('all'), $vars); $relativePath = str_replace( $this->wire->config->paths->root, $this->wire->config->urls->root, $file ); return $twig->render($relativePath, $vars); } public function ___loadTwig() { if ($twig instanceof \Twig\Environment) return $this->twig; try { require_once $this->wire->config->paths->root . 'vendor/autoload.php'; $loader = new \Twig\Loader\FilesystemLoader($this->wire->config->paths->root); $twig = new \Twig\Environment($loader, [ 'debug' => true, ]); $twig->addExtension(new \Twig\Extension\DebugExtension()); return $this->twig = $twig; } catch (\Throwable $th) { $this->log($th->getMessage()); return false; } }
-
Hi @kongondo, you have any updates on the fix?