-
Posts
705 -
Joined
-
Last visited
-
Days Won
2
Everything posted by alexm
-
Potential bug with selector subfields for guest users
alexm replied to alexm's topic in General Support
Sorry @gebeer I should have added, that yes when I add the addition of include=all it works just fine, but I don't understand why I would need to for this use case? Is it something to do with the fact that "hero_image_section" is a FieldsetPage and therefore it's another page it's getting the image from? -
I'm getting peculiar behaviour using subfield selectors. $page->children("hero_image_section.images.count>0") The above if logged in returns the WireArray of pages. If you aren't logged, it returns nothing. No "access" related template or field settings have been changed.
-
Fresh install of latest Processwire doesn't let me login to admin
alexm replied to dicabrio's topic in General Support
Naughty VSCode! Although, I dunno why it did that, as I haven't had that problem. Glad you sorted however ? -
Nice module!! I'm getting a javascript error regarding the icon on the front unfortunately and I can't seem to figure out why. Any clues?
-
Evening @kongondo, Awesome work on all the bug fixes. Thank you for all of your continued efforts!
-
I second this. My heart weeps every so slightly that this beautiful module isn't compatible with combo fields (and one presumes other profield types). It would be very delicious if it did!
-
Even better than the above... just check: if (wire('page')->template->name != 'admin') This way, if a logged in admin user is on an admin page the correct customer details will be rendered rather than theirs, but on the front end it will still fill out the admin users details if doing checkout testing.
-
I've simply wrapped the code in the function with: if (!user()->hasRole('shop')) { // Your code from github example here } And created a new role assigned to administrators of the shop. That's simple enough I'd say and if an admin wants to test the frontend form auto fill, they can simply deselect the role "shop" for testing. I'm happy with that at least unless, as you say, there is a better hook.
-
@kongondo No drama lama!! It's no issue to me. Just thought it was good to know. It's bloody chilly isn't it! ?
-
Ok. So as the comments in the hook example explain, there needs to be logic added to identify the logged in user. I'm thinking the best way to identify the customer details is to add a new role for administrators of the shop and then use a condition to check if a user has said role. If they do, don't auto-populate, as this hook overrides more PadloperProcessOrder::getOrderCustomer and this is used for more than the checkout customer details form.
-
Hey @kongondo just to let ya know there is still some issue with adding/saving products and pages in Padloper after PW v3.0.203. I've just tried updating to 3.0.208 and that little bug is there. ??
-
Yo @kongondo! Just wondering if there is a settings I can change so I can have duplicate product titles as some items in a store I am creating have the same name. Should be fine for my setup as the names will be unique and I grab the products by name which is unique. Thanking you in advance as always
-
@kongondo Ta very muchly! I'll take a wee nosey in a bit.
-
@kongondo Nice one!! Legendary work as usual. No drama pushing it mate I've got invoicing enabled anyways haha! Enjoy the footy!! It's a biggy too.
-
It's most peculiar. However, to be honest, it's not really an issue as I've just grabbed the stripe payment page and output that particular payment method. Cheers man
-
Is there any info on field names for grabbing details from orders yet? I think it's not in the docs and is TBD. I'd like to output stuff like total, items, shipping type and payment type basically on a customer dashboard
-
It's something to do with this check. If I enable invoice as a payment option there is no error. The issue is, I don't want invoice enabled really. But for now I'll just output only Stripe as a payment method rather than loop active payment methods. // --------------- // CHECK IF THIS ORDER HAS BEEN PAID // we check the payment status // @NOTE: WE ONLY CHECK FOR NON INVOICE ORDERS! $orderPaymentStatus = $response->order->paymentStatus; if (empty($this->isInvoiceOrder())) { // NON-INVOICE PAYMENT CHECK // @TODO CHANGGE THIS! // if (empty($order->padloper_order->pad_paid)) { // @TODO AMEND AS PER NEW APPROACH OF CONFIRMING SUCCESS IN GETCOMPLETEDORDER -> CAN EVEN CHECK THERE! if ((int) $orderPaymentStatus !== self::PAYMENT_STATUS_PAID) { // ORDER NOT PAID FOR BUT NOT INVOICE ORDER!, THROW EXCEPTION throw new Wire404Exception($this->_("Invalid order")); } } else { // INVOICE PAYMENTS CHECK // check if shop accepts invoice payments! if (empty($this->isShopAcceptsInvoicePayments())) { throw new WireException($this->_("Shop does not accept invoice payments!")); } }
-
Just to clarify. I'm using custom form fields. I've used both shipping and billing fields. I have only Stripe active. On the backend, I checked Invoice and PayPayl and set them to inactive. That is all I've done. Other than that, the setup is the same as or follows extremely closely the github examples
-
I have invoice payments disabled and I'm checking out using Stripe. On checkout success I get the error: User Error Exception: Shop does not accept invoice payments! (in /site/modules/Padloper/includes/order/PadloperCheckout.php line 590) Any thoughts please. Latest version of Padloper and PW version 3.0.203 as latest version causes issues with Padloper. Thanks in advance
-
@kongondo just an update on this. If I try and use custom form fields, even when using equivalent_padloper_input_name if you use a custom input_name as below will result in the same error as originally posted at confirmation. I have to use shippingAddressCountry as the input_name for whatever reason. // country [ 'input_name' => 'shipping_address_country', 'equivalent_padloper_input_name' => 'shippingAddressCountry', // @note: country ID, hence integer! 'type' => 'integer', 'required' => true ], Just thought you should know as it seems like a tiny teeny bug ?
-
Call to a member function setId() on null at confirmation step
alexm replied to alexm's topic in Padloper Support
Ok. I logged out and back in and it got the stripe payment page. When I pay and get redirected to success, now I get the attached error about "Shop does not accept invoice payments!" but this was a stripe payment.