-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
160
Everything posted by kongondo
-
Hi @froot, Sorry to hear the issue still persists! I have a feeling it is unique to your environment/setup as no one has reported something similar. Definitely! ?. Please PM details to your server where I can debug the issue. I'd need a temporary superuser account. Thanks.
-
Padloper 010 Released
kongondo replied to kongondo's topic in ProcessWire Commerce (Padloper) Support
Hi, I have updated the download to fix: File naming error (on Linux systems). Missing methods editCart() and viewCart(). Thanks. -
Tax Rounding issue (and proposed solution)
kongondo replied to alexm's topic in ProcessWire Commerce (Padloper) Support
@Spinbox, @alexm, Padloper 010 was released this week, in case you missed it ?. -
Repeaterfield on product template
kongondo replied to Spinbox's topic in ProcessWire Commerce (Padloper) Support
Hi @Spinbox, This has been reported before but I have never found a solution. This is a runtime field used by Padloper in various places to embed editable content from other sources in the current page edit. E.g. in the case of products, to load variants. Without 'InputfieldRepeaterItem' class uploading variant images does not work, i.e. they show up but do not get saved and just disappear. I'll ask Ryan for his thoughts. -
Padloper 010 Padloper 010 (aka Padloper 2 version 010) is ready for download. Requirements PHP>= 8.2.0 ProcessWire>=3.0.200 Maintenance Padloper 010 is mainly a maintenance release: Fixes money rounding bugs found in Padloper 009 (and earlier). Adds the Money for PHP Library to handle monetary values in an easy and powerful way. Fixes money math issues when prices include tax. For the sake of internal maintenance, reorganises files and directory structure. Money Matters Specifically regarding 'prices include tax', and I will be adding this to the docs, it is important that you display your prices in the frontend in a way that doesn't confuse consumers. This is not unique to Padloper but a general e-commerce issue. This means making careful decisions around displaying unit vs total prices as well as whether to include notes about potential rounding pence/cents issues in your shop's policy documents. Due to rounding issues (pence, cents, etc) when it comes to money, especially if quantity is more than 1, the math might look off. I.e., (item * quantity) + tax IS NOT NECESSARILY EQUAL TO (item + tax) * quantity. See this article for a thorough discussion. Breaking Changes There are a few unavoidable breaking changes due to code rationalisation. API Some API had to be changed for maintenance and usage simplicity reasons. This affects checkout, cart and discounts. For instance: <?php namespace ProcessWire; # OLD API $checkout = $padloper->checkout; $response = $checkout->render($options); # NEW API // $response = $padloper->render($options);// this will be deprecated in a future release $response = $padloper->renderCheckout($options); ########## # OLD API $cartRender = $padloper->cartRender; $content = $cartRender->editCart(); # NEW API $content = $padloper->editCart(); ########## # OLD API $cartRender = $padloper->cartRender; $content = $cartRender->viewCart(); # NEW API $content = $padloper->viewCart(); HOOKS Backend hooks rename: // OLD NAMING FORMAT PadloperProcessRenderXXX e.g. PadloperProcessRenderOrders // NEW NAMING FORMAT PadloperAdminRenderXXX e.g. PadloperAdminRenderOrders Other hooks rename: // OLD NAMING FORMAT PadloperXXX::methodName e.g. PadloperUtilities::getProductWeight, PadloperCart::getProductPrice // NEW NAMING FORMAT Padloper::methodName e.g. Padloper::getProductWeight, Padloper::getProductPrice Upgrading Replace all files (not overwrite!). This is because some files have been deprecated, renamed or moved. Safest way to upgrade is to get rid of all existing Padloper files and folders under /site/modules/Padloper/ and then copy over the new 010 files and folders then do a module refresh. New Features The two new features are: $padloper->money(); More information will be added to docs. Bank Name as a property (bankAccountName) in the return value of $padloper->getShopBankDetails();. See request in this topic. Next Steps As mentioned in Padloper 009 topic, the focus now will be the documentation. Any questions or issues, please let me know. Thanks.
-
Tax Rounding issue (and proposed solution)
kongondo replied to alexm's topic in ProcessWire Commerce (Padloper) Support
Hey @Spinbox, Sorry last week did not happen! I had to fix some installer issues which I finished today. I then messed up with an overzealous regex cleanup of debug code which 'cleaned out' a number of valid code in different places! I have had to revert to the state before cleanup. I will cleanup again, slowly this time, tomorrow. I'll then make the release. Sorry again. -
Order of displaying products
kongondo replied to ank's topic in ProcessWire Commerce (Padloper) Support
Hi @Spinbox, Glad you find them useful. Was thinking about this when I added the shortcuts but could not think of a 'good' way to allow custom shortcuts. This could work. I know @Peteimplemented something similar to filter orders in a shop. I'll have a think. I am guessing you don't sell these locked (replaced) products? If that's the case, you could make them unpublished and/or NOT 'enabled'. You could then use the 'Active' shortcut to hide them or the 'Draft' to show them. -
Presale question: Multiple carts?
kongondo replied to PWaddict's topic in ProcessWire Commerce (Padloper) Support
Hey @PWaddict, No. Padloper (2) does not have these modules, by the way ?. -
Tax Rounding issue (and proposed solution)
kongondo replied to alexm's topic in ProcessWire Commerce (Padloper) Support
Yes. Version 010 will be out this week (hopefully on Tuesday). Sorry for the delay. I had to take a detour to fix the code from a maintenance point of view as it was descending into maintenance hell ?. As a quick by the way (I'll explain in the release thread), I had to, unfortunately, deprecate some of the API. However, this simplifies things for me and for developers. For instance, instead of $checkout = $padloper->checkout; $checkout->render(), we now have everything directly under $padloper. E.g., $padloper->renderCheckout(); Thanks. -
Padloper 2 add CSV export to order bulk edit
kongondo replied to Guido's topic in ProcessWire Commerce (Padloper) Support
Hey @Guido, Just realised I did not get back to you with a final proposed solution! Sorry! Glad it worked for you! As mentioned above, order statuses are now fully implemented. In Padloper 009, there is a hook that is called when an order status is changed. You can hook into that to generate your CSV. However, there is no bulk edit of order statuses. Currently, it has to be one at a time. Do you save the CSV to a fixed location or you want it to be downloadable when viewing the order? Thanks. -
Hi @cpx3, Thanks for the purchase. I would never do this. I am sorry that this is how you feel. Could you please, via a PM, let me know what your email address is? I check my emails regularly and try to respond as soon as I can. It could be that I somehow missed your email! Yes there will be. I would never do this, I promise. For queries that I cannot resolve via email, here or PM, I usually ask for remote access to the site to debug the issue. This is not an excuse for the currently unfinished documentation though! Some of it (the basics) is still there. I admit, it is in a terrible state as @cpx3 has mentioned. My plan is to get MM Next out first, then work on the documentation. It is not ideal though as I would have wanted these to be ready simultaneously. This is a good shout! Will ensure so.
-
Hey all, Quick update. I have made some good progress with the re-write. However, I have run into some critical money issues so I have had to pause this work until that is resolved :-). Thanks.
-
Tax Rounding issue (and proposed solution)
kongondo replied to alexm's topic in ProcessWire Commerce (Padloper) Support
Hi all, Sorry for the delay. I found a bug that related to prices include tax, specifically in relation to shipping and discounts. Still sorting this out. Thanks. -
Hi @alexm, <?php namespace ProcessWire; /** @var WireData $shopBankDetails */ $shopBankDetails = $padloper->getShopBankDetails(); $shopBankDetails->bankName; $shopBankDetails->bankSortCode; $shopBankDetails->bankAccountNumber; $shopBankDetails->bankIBAN; $shopBankDetails->bankBIC; // @note: same as BIC $shopBankDetails->bankSWIFTCode;
-
Tax Rounding issue (and proposed solution)
kongondo replied to alexm's topic in ProcessWire Commerce (Padloper) Support
Hi @Spinbox, Sorry for my slowness! I should have updated you earlier. I ran into some issues. In the end, I decided to stop trying to reinvent the wheel and use a well-tested library. I have now implemented the Money for PHP library. It is a great little library. I wish I had done this sooner. The delay is due to the many places in Padloper code that need changing. The bulk of these are in order line items and I have finished that bit. The rest is in whole order values (totals, subtotals, etc.) and discounts. I am hoping to be done by the weekend. Thanks. -
Tax Rounding issue (and proposed solution)
kongondo replied to alexm's topic in ProcessWire Commerce (Padloper) Support
Hi @Spinbox, Yes. What @alexmsaid. There is a fix already, thanks to @alexm proposals above. In summary: Both 'calculating tax on a unit item and multiplying by quantity' versus 'totaling quantities first then applying tax' are acceptable approaches. One approach gives the taxman a few more pennies and the other saves the customer a few more pennies in taxation. I might make this configurable in the future but for now, I have adopted the latter per @alexm's suggestion (using bcmath). The rounding error mainly occurs in cases where tax is included in the price. I run around 10 million tests and all passed. There's two bits remaining. I need to implement this approach in Padloper discounts and do final test before releasing. I hope to have this ready by tomorrow. Thanks. -
Padloper 009 Released
kongondo replied to kongondo's topic in ProcessWire Commerce (Padloper) Support
Thanks man! Finally, I did a brief write-up about Customers and Customer Groups. -
Padloper 009 Released
kongondo replied to kongondo's topic in ProcessWire Commerce (Padloper) Support
Hi, I have updated the 009 release. In summary: Add method to PadloperDiscounts Class to remove all discounts applied to an (in session) order - removeDiscounts(). Thanks @alexm for the suggestion. Fix for missing 'padloper-customer' role that is given to Padloper customers for easier identification, etc. Thanks @alexmfor catching this. Fix for missing 'other optional settings' in the installer modal in list of actions to be applied when configuring Padloper. Thanks @alexm for catching this. Thanks. -
Padloper 009 Released
kongondo replied to kongondo's topic in ProcessWire Commerce (Padloper) Support
Hello, I have updated the 009 release. In summary: Fix for a customers issue that did not play nicely with ProcessWire users. Thanks @alexm. I hope to write a bit about the customers feature later today. Compare price field now only shows an error if there is a non-zero value in it and that value is less than the 'price' field. Thanks @Spinbox. Activated a 'Live Stock Checker' feature I was working on with @Pete. I will create a new thread for this to explain how it works. The Live Stock Checker allows you to check certain specified products stock levels' before allowing them to be added to the basket. It checks both available amounts since last completed order (inventory) and also the quantities currently held in baskets across sessions on your site. ps: Emails now work on the shop. Thanks @alexm Have a nice day! -
Nothing wrong with ready.php I think this is what is happening: Padloper is using virtual URL hooks. It means it needs to handle the 404s in the backend for the requested URL. On your site, something is preventing this from happening meaning ProcessWire returns 404s for those virtual URLs. I don't know what that 'thing' is on your site ...yet?.