Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


kongondo last won the day on June 19

kongondo had the most liked content!

Profile Information

  • Gender
    Not Telling
  • Location

Recent Profile Visitors

31,810 profile views

kongondo's Achievements

Hero Member

Hero Member (6/6)




Community Answers

  1. Yes indeed. Did you forget to attach the screenshots? 🙂. Issue is most like what @Spinbox mentioned. Hope it resolves your issue. I'll think about returning a meaningful error.
  2. Hi @Jan Fromm, Thanks for reporting this. Nope. Entirely my silly mistake. Nothing to do with your setup or Tracy 😁. Forgot a 'check_access=0' in the selector to grab the line item to delete (since they are in admin). So, the reason it worked with 'Tracy enabled' is, I guess, you were logged in as a Superuser :-). Anyway, sorted for now. Please grab the updated files again. Not at all 🙂. Thanks.
  3. Hi @Jan Fromm This is because you are manually processing the cart and order. I have updated my post above to be clear that those steps refer to instances when cart and order are being processed via a checkout form. As stated in my post above, Padloper tries not to create order line items pages unnecessarily. When checkout is complete (if executed via checkout form), Padloper will clean up, removing any line items pages whose corresponding cart items were removed from the cart. In your case, you would have to do this manually since you are not going through the usual checkout process. I have now added a 2nd boolean parameter to PadloperCart::removeProduct that will tell it to also delete the order line item page associated with the cart item that is being removed. Hence, your solution would be: <?php namespace ProcessWire; $padloper->cart->removeProduct($cartRowID,true); I have updated the download. Please grab it from there as usual. Thanks.
  4. Hi @alexm, Yes, the method moved. It is in the docs here. However, currently something has messed up the JavaScript in the docs so the content is not loading. Here's the code from that example: <?php namespace ProcessWire; /** @var WireArray $orderLineItems */ $orderLineItems = $padloper->getOrderLineItems(); /** @var array $orderTaxTotals */ $orderTaxTotals = $padloper->getOrderTaxTotals($orderLineItems); foreach ($orderTaxTotals as $taxShortName => $taxValue) { echo "<span>{$taxShortName}: </span><span>" . $padloper->renderCartPriceAndCurrency($taxValue) . "</span><br>"; } Exactly.
  5. Theoretically, yes. However, you would need to be aware of any laws similar to the EU Digital Goods regulations. Not closely related, but I forgot to mention (and you are probably aware of this) that we also have tax overrides that can be applied per category of products or shipping. Glad you got it sorted.
  6. Hi @Jan Fromm, It does have an effect, unless I recently broke something 😄. I've just tested the below and it works fine. Currently this is limited to the following: A product has been designated as NOT taxable. The product is specified as a digital product. The Charge EU Digital Goods VAT Taxes is ticked. The customer country is IN the EU (proceed to #6). The customer country is NOT in the EU (proceed to #7). (EU Digital Goods) Tax will be charged on this product. (unless it is a manual order and the order or the customer has been exempted from tax). Taxes will not be charged on this product (unless it was specified as taxable in #1). These complexities (at least currently) would have to be handled by the developer. I'm not sure that we currently have somewhere to hook into. I'll have a look.
  7. I am assuming you are using fetch() to send an Ajax request to some endpoint. ProcessWire will not recognise Ajax requests without the below in the header: 'X-Requested-With': 'XMLHttpRequest' The this will work: <?php if($config->ajax){ // handle ajax request here $id = (int) $input->some_input_with_id; }
  8. Thanks for confirming! Looking forward to seeing your 700+(??) variants 😁. Probably the heat wave mate 😄. Seriously though, glad it's working.
  9. Any reason why you installed the latest version on top of the older version instead of overwriting the files in the original install?
  10. 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
  11. 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).
  12. Hi @alexm, Padloper Import API is now ready in Padloper 002 announced here. Here are the Import API docs.
  13. 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.
  14. 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();
  15. 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.
  • Create New...