-
Posts
43 -
Joined
-
Last visited
Everything posted by Spinbox
-
Yes I have PowerToys, but the habit of just using 50/50 is strong in me haha. Windows 11 can group 2 windows when you asign them for example with windows+leftarrow. I have to use 2x1080p occasionally when working on location. At home I have used 3440x1440p before this. And dual 1080p before that.
-
I want to limit the purchase of some 'event'-typed product to 1 per user. Currently when an event is purchased the user get's added to a pagearrayfield which in turn grants them access to some pages. How could I limit the amount of a product to be added to the cart to 1? And after they bought it, how can I prevent them from buying it again?
-
I'm using a single 4k OLED 42" C2 tv as monitor for over a year now. Using same distance as normal dual monitors I wouldn't go any larger True and 5. If you have no direct window behind you, the glossy screen is great (there are some matte monitors with 4k out there right now, but I personally would go for oled for the deep blacks, which are not that deep on matte screens.. There is also coming an oled monitor from LG with glossy). No burn-in, I do have screensavers and hide the taskbar just in case. Burn-ins really should only occur when something is there for a VERY long time. My pc is on all day long. ^ I have no problem myself I have 120hz, personally I really like that when I move windows around it's a bit smoother Autodimming can be disabled for mine (some program is needed) Small fonts not looking great when it's a particular color combination, like red on yellow. This might be different for different TV panel types. I'm usually splitting the screen in 2, but this is particular a personal preference. (It's possible to have 25%/50%/25% but the 25% would be a bit narrow for a code editor) Perhaps looking at the new (and not yet released) 4k oled monitors could be an option. If OLED is a no-go then I would still have a 42" monitor. One thing; if you are used to this, working on dual monitors is not very pleasant (especially 2x 1080p).
-
Hi @kongondo , The admin currently has to select a field and select a value to get the results they want. In this case I only want to show a certain product type. I want to make it a bit easier to use (specially for this product type). What is the best way to have this easily accessible? Thanks,
-
Looking forward to it! And good luck 👊
- 1 reply
-
- 1
-
Actually looking for this too! Anyone! ❤️ I'm looking for something lightweight
-
RockShell - a ProcessWire Commandline Companion ⌨️
Spinbox replied to bernhard's topic in Modules/Plugins
It's probably easier to use Adminer (since I also use tracy). I have been using phpmyadmin for so long that I didn't think about alternatives 🙂 I have tried to get the pw:install command working. It looks like the stepAdmin data isn't being saved (url, user credentials,) or executed properly, the install files don't get deleted either. owever, this does work when I use them as options --name=Name etc. Not sure why that is. After some more testing I found out I actually didn't delete the previous databases these tries. My bad. -
RockShell - a ProcessWire Commandline Companion ⌨️
Spinbox replied to bernhard's topic in Modules/Plugins
It isn't anymore. but the following code can be changed for ddev get ddev/ddev-phpmyadmin # Automatically add phpMyAdmin to .ddev/config.yaml echo "services:" >> .ddev/config.yaml echo " phpmyadmin:" >> .ddev/config.yaml echo " type: phpmyadmin" >> .ddev/config.yaml echo " port: 8036" >> .ddev/config.yaml When you have to choose Timezone you have to set an integer (god knows which), instead of for example Europe/Amsterdam I will try to look into the specifics -
RockShell - a ProcessWire Commandline Companion ⌨️
Spinbox replied to bernhard's topic in Modules/Plugins
Yes, I have added rockshell alias, and a function to make it some less effort to get default setup. function setup_spinbox_project() { # Convert project name to lowercase local project_name=$(echo "$1" | tr '[:upper:]' '[:lower:]') # Check if project name is provided if [[ -z "$project_name" ]]; then echo "Please provide a project name." return 1 fi # Clone the repository and check for success git clone git@gitlab.com:#############################.git "$project_name" if [ $? -ne 0 ]; then echo "Failed to clone the repository. Check your access rights." return 1 fi # Change to the project directory cd "$project_name" || return # Run ddev config ddev config # Automatically add phpMyAdmin to .ddev/config.yaml echo "services:" >> .ddev/config.yaml echo " phpmyadmin:" >> .ddev/config.yaml echo " type: phpmyadmin" >> .ddev/config.yaml echo " port: 8036" >> .ddev/config.yaml # Start ddev ddev start # Run RockShell commands rockshell pw:download rockshell pw:install echo "Setup for $project_name complete." } -
RockShell - a ProcessWire Commandline Companion ⌨️
Spinbox replied to bernhard's topic in Modules/Plugins
Awesome stuff @bernhard I have incorperated rockshell to my workflow (together with ddev, thanks for that video, just found it). Togerther with RockMigrations they are a great improvement. A thing I noticed it doesn't delete install file and folder (and also non-used site profile, though I'm not sure the default installation deletes these) -
Thanks, looks great already 👌
-
Hi @kongondo, Do you have an update for the 'Gift Cards/Vouchers' feature and 'Discounts' feature? Thank you
-
Automate Repeater Matrix types creation with RockMigrations
Spinbox replied to Ivan Gretsky's topic in RockMigrations
Say what, more Rock? Any update to this? -
Thank you, I'm actually sending the information in handelSubmit. You first have to hide them, but it's still required.
-
I honestly can't find an option to disable it inside Stripe. Read somewhere it could be location based. It's also only with iDeal, Klarna, Bancontact, but not with cc.
-
I've made a change to the js file of the stripe payment module, removing the name input from payment methods. If I update the Padloper module in the future this will of course be overwritten. What's the best approach in changing such a thing? getPaymentElement: function (elements, mount_id) { const paymentElement = elements.create('payment', { fields: { billingDetails: { name: 'never', email: 'never', } } }); }, handleSubmit: async function (stripe, elements, event) { event.preventDefault() padloperPaymentStripe.setLoading(true) ///////////////////////// // @see: https://stripe.com/docs/payments/quickstart AND https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#enable-payment-methods const { error } = await stripe.confirmPayment({ elements, confirmParams: { payment_method_data: { billing_details : { name : document.getElementById("clientName").value, email : document.getElementById("clientEmail").value } }, // payment completion page return_url: PadloperPaymentStripe.getReturnURL(), }, }) ... }
-
Should order confirmation emails also be received by store?
Spinbox replied to alexm's topic in Padloper Support
If it's around next 2 weeks don't bother and save your time ❤️ -
Should order confirmation emails also be received by store?
Spinbox replied to alexm's topic in Padloper Support
@kongondo, how can we send a copy of a confirmation email to the store's email address? -
@netcarver Thank you, @kongondo I got it working like I wanted. Thank you for your detailed reply. I hope I sanitized everything correctly. edit: I'm not sure how to validate a password, found some topics about checking isValidPassword($pass) but not sure how to implement it here For reference Added extra fields to the usertemplate (not sure if it's better to create a seperate profiletemplate) Added an ajax check for email User is created upon order save, optionally with a password User mailchimp signup <?php namespace ProcessWire; $this->addHookBefore('PadloperProcessOrder::orderSaved', null, 'processOrderSaveCustomer'); function processOrderSaveCustomer(HookEvent $event) { $input = $event->input; $user = user(); $users = users(); $sanitizer = wire('sanitizer'); $orderPage = $event->arguments('orderPage'); $currentUser = Null; $session = session(); if($user->isLoggedin()) { $currentUser = user(); } else { $orderCustomer = $orderPage->get('padloper_order_customer'); $email = $orderCustomer->email; if($email){ // We add an account for the email provided to store customerdata (newsletter) even if the user doesn't want a login // The account can later be activated $currentUser = $users->add($email); $currentUser->email = $email; // Login to the new account if($input->post->createAccount == 1) { // Not sure if I need both of these $users->setCurrentUser($currentUser); $session->forceLogin($currentUser); } } } // Save order to currentuser $orderCustomer = $orderPage->get('padloper_order_customer'); $orderCustomer->userID = $currentUser->id; $orderPage->save('padloper_order_customer'); if($currentUser) { $currentUser->of(false); $currentUser->pass = !empty($currentUser->pass) ? $currentUser->pass : $input->post->pass; $currentUser->shippingAddressFirstName = !empty($currentUser->shippingAddressFirstName) ? $currentUser->shippingAddressFirstName : $sanitizer->text($input->post->firstName); $currentUser->shippingAddressMiddleName = !empty($currentUser->shippingAddressMiddleName) ? $currentUser->shippingAddressMiddleName : $sanitizer->text($input->post->middleName); $currentUser->shippingAddressLastName = !empty($currentUser->shippingAddressLastName) ? $currentUser->shippingAddressLastName : $sanitizer->text($input->post->lastName); $currentUser->shippingAddressPhone = !empty($currentUser->shippingAddressPhone) ? $currentUser->shippingAddressPhone : $sanitizer->digits($input->post->shippingAddressPhone); $currentUser->shippingAddressLineOne = !empty($currentUser->shippingAddressLineOne) ? $currentUser->shippingAddressLineOne : $sanitizer->text($input->post->shippingAddressLineOne); $currentUser->shippingAddressLineTwo = !empty($currentUser->shippingAddressLineTwo) ? $currentUser->shippingAddressLineTwo : $sanitizer->text($input->post->shippingAddressLineTwo); $currentUser->shippingAddressPostalCode = !empty($currentUser->shippingAddressPostalCode) ? $currentUser->shippingAddressPostalCode : $sanitizer->text($input->post->shippingAddressPostalCode); $currentUser->shippingAddressCity = !empty($currentUser->shippingAddressCity) ? $currentUser->shippingAddressCity : $sanitizer->text($input->post->shippingAddressCity); $currentUser->shippingAddressCountry = !empty($currentUser->shippingAddressCountry) ? $currentUser->shippingAddressCountry : $sanitizer->text($input->post->shippingAddressCountry); $newsletterSignup = $sanitizer->int($input->post->newsletter); if($newsletterSignup == 1) { $currentUser->newsletter = $newsletterSignup; $mc = modules()->get("SubscribeToMailchimp"); $mc->subscribe($currentUser->email, ['FNAME' => $currentUser->shippingAddressFirstName, 'LNAME' => $currentUser->shippingAddressLastName]); } $currentUser->addRole('login-register'); $currentUser->save(); } $event->arguments('orderPage', $orderPage); } Check if an users email exists <?php namespace ProcessWire; if($config->ajax) { $email = sanitizer()->email(input()->get->emailExists); if($email != '' && users()->get("email=".$email)->id > 0) { echo json_encode(users()->get("email=".$email)->id); } else { echo json_encode(false); } exit(); }
-
Thank you, I got it working, probably not the best code $this->addHookBefore('PadloperProcessOrder::orderSaved', null, 'processOrderSaveCustomer'); function processOrderSaveCustomer(HookEvent $event) { $input = $event->input; $user = user(); $users = users(); if($user->isLoggedin()) { $currentUser = user(); } else { $currentUser = $users->add($input->email); $users->setCurrentUser($currentUser); } if($currentUser) { $currentUser->of(false); $currentUser->email = $currentUser->email != '' ? $currentUser->email : $input->post->email; $currentUser->pass = $currentUser->pass != '' ? $currentUser->pass : $input->post->pass; $currentUser->newsletter = $currentUser->newsletter != 1 ? $currentUser->newsletter : $input->post->newsletter; $currentUser->addRole('login-register'); $currentUser->save(); } if($currentUser->newsletter != 1) { // load module into template $mc = modules()->get("SubscribeToMailchimp"); // add merge_fields to fill out user data, based on your audience MERGE_FIELD options // You need to setup the fields at "Settings > List fields and *|MERGE|* tags" first! $mc->subscribe($currentUser->email, ['FNAME' => $currentUser->shippingAddressFirstName, 'LNAME' => $currentUser->shippingAddressLastName]); } } I have also an ajax check if the emailaddress exists for a user. If so, they need to login and are redirected back to the checkoutpage. Only problem I face is that the userID isn't added to the current order. (If i'm already logged in and start a new order, the userID is added to the order). How can I add or update the userID for this order?
-
I would like to add extra fields to the customer form fields next to the default ones specified in https://docs.kongondo.com/start/checkout/custom-customer-form.html while checking out. In this particular instance I would like to add a checkbox for newsletter signup, which I would like to process after submitting or on next page of checkout. I've tried to add a field to custom_form_fields, however I don't seem to get the desired value (from $padloper->getOrderCustomer()). Is this possible and how would I handle this?
-
Non-superuser with the padloper-shop permission can't edit products
Spinbox replied to Spinbox's topic in Padloper Support
Thank you very much! I have been using ProcessWire for quite a bit so I should have known. I have enabled access for padloper template and it's children and it works. -
Do you have a eta for this feature? 🤗
-
Found out, I had a typo in renderViewURL (no caps URL). Nice to have those debug messages present 😉