Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. Google threw up a few interesting results for JavaScript Kanban. jKanban: allows you to create and manage Kanban Board in your project. https://github.com/riktar/jkanban + demo http://www.riccardotartaglia.it/jkanban/ A codepen demo: https://codepen.io/karthikdevarticles/pen/PopxPwO
  2. Just a quick one ... This is two questions in one. Integration: Probably not the answer you are looking for but literally any JavaScript library can be integrated into the PW backend. There are various options here including a dedicated ProcessModule or an Inputfield (e.g. a runtime one). Update data in real time. Any JavaScript and newer libs like HTMX can easily do this. The bottom line is this: (a) An action happens on the client (b) JS listens to that action/event (c) optionally but ideally, check if the action is valid (e.g. was this field completed) (d) send the info to the backend - usually via ajax for the type of app you are building (e) the backend processes the action you have sent including validation + sanitization. If these pass, it takes an action, e.g. 'create a page' or 'update a field' (f) the server sends the response back to the client which is listening for a response from the ajax request. Traditionally/usually, the response is JSON but with HTMX, the response is HTML. (g) The client handles the response, in many cases, updating the DOM. That's it. Yes. Media Manager, for instance. You drop files and it will upload the files then create media pages off of that. Yes. ProcessWire itself to be honest. Basically $input, $sanitizer, $config->ajax and $pages are the usual tools. Not a reuse per se answer. Listening to drag and drop using JavaScript used to be a chore. With modern browsers, APIs exist to do it easily in vanilla JavaScript. If you wish to get a ready made solution searching for JavaScript drag and drop will yield some results. Personally, I'd go for htmx + vanilla JS drag and drop, or htmx + sortable combo (here's a Python example).
  3. Hi @alexm, Padloper Import API is now ready in Padloper 002 announced here. Here are the Import API docs.
  4. This thread is for me to announce Padloper releases (until I find a better way to do it). Please use your download link (sent to your email) to get the latest Padloper version. Please don't post your bug reports on this thread. Instead, create a new thread for that in this support forum. Thanks. Releases Release Sunday 12 June 2022: Padloper 002 Features Add Import API (currently for product-related imports only). This allows you to import items (attributes, categories, products, generate variants from scratch, etc) into your padloper shop. Please see the Import API documentation. Rest of the World Shipping Zone is now fully functional. Configurable dynamically loaded product variants. This is useful for cases where a product contains lots of variants. Editing such a product will slow down the browser considerable as all children pages (variants) will be loaded as well. Bug Fixes Please see the bug fixes prior to today's release date referenced in the bugs and fixes thread. --- Release Thursday 14 July 2022: Padloper 003 Features Add Addons Feature. This allows you to extend the functionality of your shop by developing, adding and activating addons (mini apps). The forum announcement about this feature is here. Please see the Addons documentation and the related Addons API documentation. A short demo of the feature is available here. Bug Fixes Please see the bug fixes for today's release date referenced in the bugs and fixes thread. Release Sunday 24 July 2022: Padloper 004 Features Update FieldtypePadloperOrder schema to include details about selected shipping rate name and delivery times. Amend single order view GUI to show order shipping rate name and delivery times. See the request details here. Make a number of methods hookable - for extra validation of custom form inputs and custom determination of whether to apply EU digital goods tax. See the request details here. Release Tuesday 30 August 2022: Padloper 005 Features Amend inventory GUI to allow non-editing of locked variants (similar to products without variants). Bug Fixes Please see the bug fixes for today's release date referenced in the bugs and fixes thread. Release Friday 23 September 2022: Padloper 006 Features Make PadloperProcessOrder::getOrderCustomer hookable. This has various uses, e.g. allows to initially pre-fill customer details to the order checkout form during order confirmation. Can be used, for instance, in conjunction with LoginRegister module. See the request details here. Demo code is available here. Bug Fixes Please see the bug fixes for today's release date referenced in the bugs and fixes thread. Release Tuesday 27 September 2022: Padloper 007 Features/Enhancements Don' t show product properties settings in General Settings > Standards Tab if product property feature was not installed. Bug Fixes Please see the bug fixes for today's release date referenced in the bugs and fixes thread. Release Sunday 08 January 2023: Padloper 008 Features/Enhancements Fix bugs related to the demo starter projects. Bug Fixes Please see the bug fixes for today's release referenced in the bugs and fixes thread. Release Sunday 05 May 2024: Padloper 009 Features/Enhancements Please see the dedicated thread here. Bug Fixes Please see the bug fixes for today's release referenced in the bugs and fixes thread.
      • 6
      • Like
  5. Hi @Kholja, Thanks for reporting. This has now been fixed in today's update. The issue was we were only checking for quantity=0 BUT NOT 'remove item' request as well. For information, this is how Padloper currently handles items removed/updated/added to the cart. Please note that below ONLY APPLIES to cart and order processing executed via an order checkout form (i.e., not if manually processing cart and order using the API). If at least one item is added to the cart AND the customer has started the checkout process by 'proceeding to confirmation', an order page is immediately created. The line item(s) is added to the order page. This allows for tracking abandoned carts. If an item is updated (increased quantity or decreased quantity BUT NOT ZERO quantity) in the cart: In the line item, there is nothing to do at this point. If an item is either removed OR quantity is ZERO, the item is removed from the cart but still we don't delete the corresponding line item in the order page. Instead, we hide it (it is a pending item). This caters for situations whereby the customer might decide to re-add the product to the cart after removing it completely. In such cases, we only need to unhide the line item in the order page instead of creating another page. When the order is completed, any hidden line item pages (pending items -> meaning they were not purchased) are deleted. I am mentioning the above, especially #3 since if you are manually getting and displaying (i.e., using $pages->find()) order overview before purchase is complete, you should not use include=all or include=hidden as that would display pending items to the customer. Use check_access=0 instead, or better, $padloper->find();
  6. Hi @Jan Fromm, That is the expected behaviour because variants are products in themselves. So, if you enable variants, it means you will in effect have several products (the variants) that can be enabled independently of each other. At this point, the main product's enabled status does not come into play. However, other shared fields are still relevant, e.g. properties, tax, etc. Hope this makes sense.
  7. @csaggo.com Thanks. Yes, like I stated, your issue is not related to JavaScript at all from what I can see. Thanks for confirming. This is indeed strange since the search for dimensions and properties is powered by ProcessWire itself. They are direct implementations of InputfieldPageAutocomplete. I don't think it is a language issue either as the selector passed to them is their template. I am wondering whether the dimension and property pages you created are not activated (by Padloper). Is this a multilingual site?
  8. Hi @Jan Fromm, Similar to the non-object issue, I have fixed this directly on your site files. I'll update the Padloper source files later and upload for downloading as usual. Could you please check that it works? Could you confirm that this doesn't work? I didn't find any issues with it. Thanks.
  9. Hi @Jan Fromm, I have now fixed this directly in the files on your site. I'll update the project Padloper files as well and upload the updated files for download, as usual. The issue was a NullPage was getting returned from a find; a non-existent page ID in the session. Maybe confirm that the products you render actually have their product->id rendered correctly.
  10. @csaggo.com, Yes, and they are. Properties apply to the product page itself and not variants. So, to be crystal clear, properties are always available to all products as long as you selected the 'properties' feature when installing Padloper ?. Correct. OK this and ... this...tell me your issue is not JavaScript related as per the #1 issue in the bugs and fixes thread. Again (sorry) to be crystal clear, your issue is: You click on 'add new property'. A new blank row for properties is added to the DOM. You try to search for a property (e.g. Breite) or a dimension (e.g. Milli) BUT NOTHING happens. Am I correct about 1 - 3 above? 4. Secondly, has this worked previously then it stopped working? Thanks.
  11. Hi @Jan Fromm, Thanks for reporting I'll have a look and get back to you.
  12. Glad you manage to catch it again! However, I am not sure what is going on there since $product->padloper_images should return a Pageimages object. I am wondering what your $product is in this case. I have not been able to reproduce this locally. I am wondering if we could again arrange a temporary access to your site for me to have a peek? Thanks.
  13. You are right. I should have been clearer. With respect to products, it will only get loaded if the product has the setting Enable Product Variants enabled. In your case, I am still confused though. Are you able or not able to add properties? If the answer is no to #1, what happens when you click on the link 'add new property'? If the answer to #2 is 'it adds a blank new property', is your issue then that when you type in either the 'property' or 'dimension' inputs, nothing happens? If you got to #4, does this happen to all products or main products or only products with variants? Thanks.
  14. Hi @Jan Fromm, Apologies, I botched the build. This has now been fixed. I'll be implementing a better versioning system to avoid things like this. Please download and test again. Thanks.
  15. I have watched a number of critical reviews about Co-Pilot on YT and I am not so sure anymore if the future looks bright.
  16. I always check before I make an announcement but I have checked again and it contains the correct files ?. There is only one changed file (InputfieldPadloperRuntimeMarkup.js) as the issue was caused by JavaScript. I am wondering if you browser is still serving previously cached values? Please let me know, thanks.
  17. I now get what you meant. I think the bug #1 below is what you meant? This has now been fixed. Thanks for reporting. This is what confused me. I thought you meant you were able to add but not to search for dimensions. My mistake. It's all fixed now, thanks.
  18. This thread is for me to relay bug fixes (until I find a better way to do it). Please don't post your bug reports on this thread; unless it is about a fix that doesn't work for you. Thanks. Tuesday 7 June 2022: There was a bug in the Padloper version uploaded on Friday 3 June 2022 (ajax loading of variants) that prevented adding of new shipping rates, new product properties, new attribute options, new territory tax rates and new tax overrides. This has now been fixed. Please re-download if you either downloaded or received your copy since Friday 3 June 2022. Thursday 9 June 2022 Fixed bug that allowed adding non-enabled products to cart. Fixed bug that ignored price hook applied to cart items when completing order/checkout. Fixed bug that attempted to get image field from a NullPage. Friday 10 June 2022 Fixed bug that failed to synchronise Padloper cart and order - removed items were not completely 'removed' from order even after checkout. Thursday 14 July 2022 (Padloper 004) Fixed bug that threw SQL for table not found. This was caused by not checking if downloads feature was installed in a Padloper shop install. Fixed bug related to accessing language value for product title. This was caused by not checking if PageTitleLanguage was actually in use in a multilingual site. Fixed bug related to marking an order as paid in cases where payment providers feature was not selected during Padloper install. Tuesday 30 August 2022 (Padloper 005) Fixed bug that deleted product (and variant) price and compare price when editing items via inventory GUI. Fixed bug in Padloper 004 related to updating FieldtypePadloperOrder table schema with respect to fresh installs. Fixed bug that prevented deletion of orders, products with variants and attributes. Friday 23 September 2022 (Padloper 006) Fix various PHP 8-related deprecation issues. Tuesday 27 September 2022 (Padloper 007) Fix bug that prevented complete uninstall from completing. Sunday 08 January 2023 (Padloper 008) Fix typos in Padloper invoice template CSS link. Fix fatal error if addons directory not found. Remove deprecated options in checkout templates in the demo projects (reported here and here). Fix bug that prevented installation in ProcessWire version > 3.0.203. Fixed erroneous 'Shop does not accept invoice payments' notice reported here. Sunday 05 May 2024 (Padloper 009) TBD
  19. Hi @alexm, Just a quick update that I have made very good progress with the 'add' API. I hope to release this by the end of the week.
  20. Hi @Sonia Margollé, Thanks for your interest in Padloper. Currently an email notification is sent to the customer upon order confirmation. If order has been paid for and it includes digital goods, the links to download them are also sent to the customer. Currently, an email to the admin is not yet implemented (in contrast to Padloper 1). However, the admin can see the latest 10 orders and their status in the shop dashboard/landing page. Customer management is not yet implemented but is planned. Yes, they will be a ProcessWire user. However, Padloper will not manage roles and permissions beyond checking if they are logged in. This is not planned. What is planned is an admin being able to manage customers. However, devs can easily implement a 'customer dashboard' using the $padloper API. This is no different from a ProcessWire selector, e.g.: <?php // @note: can search by email, order value, name, shipping address, country, etc $customerOrders = $padloper->find("template=order,order_customer.email=someone@email.com,limit=10"); Current dashboard looks like this: Yes. The documentation is still lagging behind though. What sort of API were you looking for? Hope this helps.
  21. Great find! Dare I say MS $ since they purchased GitHub ?.
  22. Hi @Jan Fromm, This has now been fixed. Products or variants that are not enabled for selling cannot be added to the basket. However, please note that since Padloper does not involve itself with the frontend display of products, developers will need to exclude such non-enabled products from frontend display, if they wish to. For instance: <?php // please note the below will also find parent product of variants! // FIND non-enabled products and variants $nonEnabledProductsAndVariants = $padloper->find("template=product|variant,stock.enabled=0"); // FIND enabled products and variants $enabledProductsAndVariants = $padloper->find("template=product|variant,stock.enabled=1"); I also fixed a bug that allowed out-of-stock items to be added to the basket/cart. Please note that out-of-stock is only applicable to products/variants that track their inventory (Product Settings Tab) AND that don't allow overselling/backorders.
  23. Here's an example hook on how to modify the price of a product using the API https://docs.kongondo.com/hooks.html#price-hook
  24. Hi @Jan Fromm This is how you add to cart programmatically: Please note that Padloper (2) does not make a distinction between $product ID and $variant ID. A variant is just a product that happens to be the child of a main product. Hence, addProduct() below takes the ID of the product page if you are adding a product without variants or the variant page if you are adding the variant of a product page. Add one (quantity) of a product or a variant <?php $padloper->cart->addProduct($product->id); // OR /** @var PadloperCart $cart */ // $cart = $padloper->cart; // $cart->addProduct($product->id); Add multiple (quantities) of a product or a variant <?php // add 17 (quantity) of this product $padloper->cart->addProduct($product->id, 17); // OR /** @var PadloperCart $cart */ // $cart = $padloper->cart; // $cart->addProduct($product->id,17); If you want to add multiple products: Find the products (PageArray of products) using a selector, e.g. by collection/categories. Then loop through and add each: <?php // add products from the collection 'accessories' /** @var PageArray $products */ $products = $padloper->find("categories=accessories"); foreach ($products as $product) { $padloper->cart->addProduct($product->id); } OR using findRaw() array of stdClass <?php /** @var array $products */ $products = $padloper->findRaw("categories=accessories,objects=1", ['id']); foreach ($products as $product) { $padloper->cart->addProduct($product->id); } OR using findRaw() plain array <?php /** @var array $products */ $products = $padloper->findRaw("categories=accessories", 'id'); foreach ($products as $productID) { $padloper->cart->addProduct($productID); } Hope this helps.
×
×
  • Create New...