-
Posts
71 -
Joined
-
Last visited
Everything posted by Spinbox
-
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,
-
RockFrontend 🔥🚀 The Powerful Toolbox for ProcessWire Frontend Development
Spinbox replied to bernhard's topic in RockFrontend
Thanks @bernhard, that works ? I think I'm going to dive into Latte. It looks like RPB isn't suited for Twig. As both modules are designed with Latte in mind I have to give this a try. Thank you for all your hard work. -
RockFrontend 🔥🚀 The Powerful Toolbox for ProcessWire Frontend Development
Spinbox replied to bernhard's topic in RockFrontend
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. -
RockFrontend 🔥🚀 The Powerful Toolbox for ProcessWire Frontend Development
Spinbox replied to bernhard's topic in RockFrontend
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?
-
I'm having an issue where the total price with tax differs from the unit price with tax for a product. The store also has 'All taxes are included in stated prices' checked under tax settings and tax is set at 21%. Is there a fix planned for this or can I hotfix this for now?
-
Not able to retrieve/generate product variant attributes
Spinbox replied to Spinbox's topic in Padloper Support
Thank you @kongondo, You got me on the right path and I have found the issue. My homepage template has url segments enabled. Once I disable this, the url works. Not sure if this contributes to the problem but I use TemplateEngineFactory. To keep url segments I used a regex to allow anything but paths that start with find-padloper in the template settings. regex:^(?!find-padloper).*$ -
Not able to retrieve/generate product variant attributes
Spinbox replied to Spinbox's topic in Padloper Support
Thanks for looking into it, I'm going to check what could be the problem.. -
Not able to retrieve/generate product variant attributes
Spinbox replied to Spinbox's topic in Padloper Support
Hi @kongondo, no I am not running of a sub-directory. I haven't changed anything, so I assume it uses the default language (in my case Dutch). I'm not sure it has anything to do with language. Isn't it just looking for the default language values? -
I'm having problems with retrieving attributes for Variants. This hook seems to not triggering for me: $this->addHook("/find-padloper_product_attributes/", $this, 'hookFindPadloperProductAttributesOptions'); When trying to find attributes it returns a 404. I'm using multilingual fields.
-
Works for me!
-
I phrased it wrong. I can save it, but I'd rather not have my client confused ? thanks!
-
After updating I can't simply save an existing product. Is it possible to keep the compare price empty? Looks like it's not possible and it resets to 0. Probably because of the database type.
-
Great stuff ? Can't wait to use it!
-
Limit the amount of products a user can purchase
Spinbox replied to Spinbox's topic in Padloper Support
Great stuff! Cheers ? -
I have managed to save the charge id to the order. For this to work I needed to make captureOrder hookable. This is probably not the right way tough.. $wire->addHookAfter('PadloperProcessOrder::captureOrder', function(HookEvent $event) { $paymentIntent = $event->return; $orderId = $paymentIntent->metadata->reference_id; if ($paymentIntent && $paymentIntent->status === 'succeeded') { $chargeId = $paymentIntent->latest_charge; // Load the order page using the order ID and save the charge ID $orderPage = wire()->pages->get("template=padloper-order, id={$orderId}"); if ($orderPage->id) { $orderPage->of(false); $orderPage->set('stripe_charge_id', $chargeId); $orderPage->save(); } } });
-
Hi @kongondo, I'm trying to generate product variants on two different installations but when the InputfieldTextTagsSelect tries to get options I get a 404 error.. (It just shows not found page) /find-padloper_product_attributes/?id=2388&field=padloper_product_stock&parent_id=3092&context=options&q=tes I'm running 3.0.229 and 3.0.200 on php 8.2 and Paloper 008 . Are you familiar with this problem?
-
Thanks, ? I was positive I had that selected, but I can't seem te reproduce ?, don't tell anyone.
-
Thank you for the pointers, I feel like a newb sometimes, let me cook something up.