Jump to content

kongondo

PW-Moderators
  • Posts

    7,470
  • Joined

  • Last visited

  • Days Won

    144

Everything posted by kongondo

  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. --- 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.
  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.
  16. @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?
  17. 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.
  18. 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.
  19. @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.
  20. Hi @Jan Fromm, Thanks for reporting I'll have a look and get back to you.
  21. 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.
  22. 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.
  23. 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.
  24. 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.
  25. 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.
×
×
  • Create New...