Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by joe_g

  1. Hi there, on ProcessWire 3.0.208 dev PHP 8.1: my editor user is missing a delete button, and I'm not sure why the role has global delete on the user can edit the template: I'm missing something, but I don't know what ! thank you, J
  2. After testing I can say that echo $padloper->cart->addProduct(1043); works fine, but however echo $padloper->cart->removeProduct(1043); does not work Why would that be?J
  3. Thanks, I'm mostly looking for a way to remove a product from the cart, I can't seem to find thatin the link you attached JJ
  4. Hi there, I think what would help is a very minimal setup, a demo without ajax/htmx, templating etc. In the absence of that, here is a super basic question: 1. How do I add and remove a product to the cart purely via the API? This is for me to understand the basics. I'm imagining it would be something like $cart = $padloper->getCart(); if(!$cart->addProduct(product_id)) { echo 'problems adding'; } if(!$cart->removeProduct(product_id)) { echo 'problems removing'; } tx J
  5. I get the same result from $padloper->remove(1190); by the way. The url seem to indicate the product is removed, but it isn't.
  6. or perhaps something like...? $c = $padloper->getCart(); $c->emptyCart();
  7. I'm trying to make a minimal setup without ajax, so far I've got: <form method="post" class="padloper-cart-add-product flex ml-auto" action="<?= $config->urls->root ?>padloper/add/"> <?=$session->CSRF->renderInput()?> <input type='hidden' name='product_id' value='<?=$product->id?>'/> <input type="submit" value="Add"> </form> <form method="post" class="padloper-cart-remove-product flex ml-auto" action="<?= $config->urls->root ?>padloper/remove/"> <?=$session->CSRF->renderInput()?> <input type='hidden' name='product_id' value='<?=$product->id?>'/> <input type="submit" value="Remove"> <?=$product->id?> </form> Add works, remove not - how come? Remove returns a redirect to https://domain.com/padloper/remove/?removedProduct=XXX but the cart isn't updated (Then, after that, lots of redirects) tx, J
  8. Is there a... <form method="post" action="<?= $config->urls->root ?>padloper/empty/"> ...or similar call I can make?
  9. .. when looking for a solution I see 'variants' in the code but I'm not sure how to make it work. Seems to be the same as Attributes? But if i add some attributes I can't see any change in the product page (no new fields to fill, or similar)...
  10. I guess one way to do this (without an actual discount system) would be to automatically generate 3 products, one with the original price, and two with the discounts. Then instead of using the builtin 'add to cart' I'll make my own add to cart that adds the appropriate product depending if the kids are siblings or not..? ...actually no. That won't work because it will not keep track of the inventory.. THe workshops have limited spots (12), so inventory is really handy for helping to see if something is fully booked
  11. Hi there, Now that I have a functioning padloper installation I have my first real challenge. One that actually might be a bit tricky. Maybe too tricky? The client wants to sell workshops for kids, and give discounts for siblings, X% for the first sibling and Y% for two or more siblings. What's the best way for me to go about this? many thanks for your thoughts, J
  12. Ha, that was it. Too low amount. Now I have a fully functional proof of concept setup. Very nice. Now the error message is very clear, it says that it's a test setup. The previous more generic error was due to the low amount.
  13. Oh right, it says pretty clear "Does not track inventory", enabling that and it work ofc. How do I delete this thread 🙂 ?
  14. Hello again, So I sold a fictions workshop in my test set up using bill as payment method, but it didn't affect the stock. I imagined that right after someone press confirm the stock should decrease thanks, J
  15. Hello, I've gotten quite far with my test setup but at the final step stripe gives an error: Some cookie issues in the console: I disabled adblockers and such. No other errors anywhere, from what I can see. I'm using a test account on stripe (not live keys), but I would imagine it would fail more gracefully if this was the reason? tx, J
  16. Hi, typo - I think? /site/modules/Padloper/templates/invoice line 74 PadLoper -> Padloper (lowercase L) J
  17. Yes I did make a mistake. I reinstalled everything under Padloper/ and I got a bit further..
  18. Oh I see, thanks. So the $customFormFields in checkout.php is a 'schema' to define the fields, then I also need to change the markup myself. Makes sense. Maybe it's good to mention the markup file here as well, it wasn't clear to me that it existed: https://docs.kongondo.com/start/checkout/custom-customer-form.html#supported-form-inputs Initially I wasn't sure if the checkout.php did anything at all, but since I could hide and show the arrow, I knew it did : P . Not my most thought-through comment. No problems, one step at a time. Appreciate the patience (more questions to come for sure : P ) tx J
  19. Hi hello, I've gotten a bit further but the Pay XX button doesn't do anything (after choosing strip as payment method). There are some console errors: The path to the missing js fil has an extra "padloper/" in it, but my install is one level up, directly under modules: I remember first trying to put it all under 'Padloper' but not getting it to work. Did I make a mistake? So should all the padloper module stuff be under "Padloper/" actually? tx J
  20. I found this video, and in it there is a list of addons that I couldn't find anywhere, so that's why I asked:
  21. Hello, The addons doesn't seem to be included in the padloper 2 download. Where can I find them? If i go to settings addons I get If I instead create the folder /templates/padloper/addons/ I get tx,J
  22. Hi there, I'm trying to change the custom checkout form but it's not using the code for the custom form. No matter if I use the latest demo-1 version (with corrected variable names): https://github.com/kongondo/Padloper2Starter/blob/demo-1/templates/checkout.php or the minimal version: https://github.com/kongondo/Padloper2Starter/blob/demo-5/templates/checkout.php it looks the same However if I change $isShowSectionBackArrow to 'false' it does hide the arrow, so my checkout.php is processed. Also if i set $isCustomForm to 'false' i get a different, more basic, layout: tx,J
  23. Hi there, Clicking "proceed to confirmation" in the checkout reloads the page instead of going further. Debugging shows that "$response->errors" is not empty, it contains: Array ( [0] => shippingAddressCountry ) tx - j The form looks like such:
  • Create New...