Jump to content

Jan Fromm

Members
  • Posts

    52
  • Joined

  • Last visited

Everything posted by Jan Fromm

  1. Hi @kongondo, Thanks for checking! No hurry – it’s not urgent from my end.
  2. Hi @kongondo, I may have discovered a bug. I am using billingAddressCountry in the Customer Checkout form: <select id="billingAddressCountry" name="billingAddressCountry"> <option>&nbsp;</option> <option value="1195">Belgium</option> <option value="1205">Germany</option> <option value="1454">United Kingdom</option> </select> After submitting the form, $orderCustomer looks like this: ... ["billingAddressCountry"]=> string(4) "1205" ["billingAddressCountryID"]=> int(0) ... However, it should look like this: ... ["billingAddressCountry"]=> string(7) "Germany" ["billingAddressCountryID"]=> int(1205) ... Apparently $orderCustomer->billingAddressCountry is not determined based on the submitted Country ID of billingAddressCountry. Or did I understand this wrong?
  3. I would like to provide the customer with an optional license address (and occupy the billing address fields for this). In this case, useBillingAddress would be very useful for form validation: when this checkbox is selected, the billing address input fields become required. I can solve this in another way, but useBillingAdress seems well suited for this.
  4. Hi @kongondo, I am trying to place useBillingAddress in a Customer Checkout Form: <input name="useBillingAddress" id="useBillingAddress" type="checkbox" value="1"> <label for="useBillingAddress">Use Billing Address</label> I’m not sure if this is really required, but I also referred to this field in the checkout template: $customFormFields = [ [ 'input_name' => 'useBillingAddress', 'type' => 'integer' ], ]; Anyway, no luck. When I look in $orderCustomer during checkout confirmation, it always shows ["useBillingAddress"]=> int(0), whether the checkbox is selected or not. The documentation doesn’t list useBillingAddress as a Supported Form Input field – Should I assume it’s not possible this way? Thanks!
  5. It did! I got it to run with two custom fields in the order-template. These are populated with a hook in __orderSaved and then shown at checkout-confirmation and on the invoice. Thanks again for your help, @kongondo!
  6. Hi @kongondo, Sorry for the long silence. I finally had a chance to look into the demo and am amazed that your VAT validation code is already 99% functional! I just had to take into account the country prefixes and now it runs like a charm. Anyway, one milestone passed, and the next one is just around the corner. I’d like to store the customers VAT number in OrderCustomer so I can display it on the confirmation page and on the invoice. I guess I need to add a custom field to the OrderCustomer template, right? I’m not sure where to do that, unfortunately. My second issue is to show a note on the invoice if Reverse Charge applies (customer has valid VAT number and gets an invoice without VAT). My idea is to hook in __orderSaved and add this hint to the order using the Notes feature. Unfortunately I have not found any information about this in the demos and the forum. As always, I appreciate any hints and help. Thanks!
  7. You are really amazing @kongondo. Big thanks! I’ll take a look at it.
  8. No rush @kongondo. Thanks in advance! BTW: I found a promising PHP class for VAT validation. In case you want to take a look at it.
  9. Probably with a SOAP call to the EU VAT Information Exchange System (VIES). That would already make sense. Thanks a lot!
  10. Hi @kongondo, Have you been able to check this? I am currently thinking about how I could add this functionality. My current idea looks like this: 1) Add new textfield »VAT« to custom customer form 2) Hook processCustomOrderCustomerForm and process VAT validation 3) Hook isChargeEUDigitalGoodsTax At the moment, digital goods taxes are collected IF 1 It is set in the store settings AND 2 The customer is located in the EU AND 3 It is a digital product This must be extended by 4 The customer does NOT have a valid VAT number, unless he is located in the same country as the shop owner. Is this possible? There are some pitfalls for sure, but that would be my approach. Thanks further hints, ideas or doubts!
  11. Just tested it, I can add properties and dimensions, search is working fine. Padloper 0.0.2, version from 27 June PW 3.0.184
  12. It does. Thanks for the explanation, @kongondo!
  13. Somehow related: $padloper->getOrderTotalAmount() returns 0 once the order is confirmed. I am trying to display the order net amount (Excluding taxes and shipping) in the order-products-table.php template. In /checkout-custom/confirmation/ it works, but in /checkout-custom/success/ it returns 0.
  14. Thanks @kongondo for clarification and the swift update. I’ll print this out and put it on my wall ?
  15. Hi @kongondo, Thanks again for your quick help and customization of the module. Unfortunately I have to ask another stupid question, which probably has nothing to do with Padloper, but with my setup. I installed your update and added the new parameter. Now the product is deleted from the cart and the order, but only when Tracy Debugger is active. When I test without Tracy Debugger, only the cart is updated, but not the order. I have refreshed the module several times, and also cleared the cache with Cache Admin. Still, the updated code doesn’t seem to be applied in every context. Sorry to bother you again with such small stuff.
  16. Me again ? The same happens when I try to remove the product programmatically: $cartRowID = $padloper->cart->checkIfProductInCart($fontID); $padloper->cart->removeProduct($cartRowID); This removes the product from the cart, but not from the order. I have also tried setting the quantity to zero: $padloper->cart->updateProduct($cartRowID, 0); But that gives the same result. Do you maybe have a hint?
  17. That was the trick. Thanks! Assuming that only digital products are to be sold, would it be enough to only care about the tax rates of EU countries? The other countries could be created without tax rates, right? Fantastic. Thanks again.
  18. Hi @kongondo, I would be interested to know to what degree Padloper handles EU taxes for digital products, and what may need to be added by the developer. As I’m sure you know, this varies greatly depending on whether the seller is based in the EU or not, whether the customer is based in the EU or not, and whether it's private (without VAT number) or business (with VAT number). There is this option »Charge EU Digital Goods VAT Taxes« in the tax settings. As far as I can see, this has no effect yet. Or did I miss something? Is this still WIP? Or what are your plans? Thanks!
  19. One more thing – What happens now is when you enable variants, the product gets disabled. 1) Content tab: Check enabled -> Save 2) Settings: Enable Product Variants: Yes -> Save 3) Content tab: Checkbox disappeared 4) Settings: Enable Enable Product Variants: No -> Save 5) Content tab: Checkbox re-appeared, but is unchecked
  20. Sorry, my mistake. I had placed the hooks in the products template. Now they are in _init.php and are applied properly. Thanks again @kongondo!
  21. Thanks @kongondo for reviewing my setup. The non-existent page ID is from an accidentally deleted product.
  22. Sorry @kongondo, the error came up again after I re-enabled TracyDebugger. With TracyDebugger disabled, everything is fine. Calling a member function count() on null It is this function in .../site/modules/Padloper/includes/order/PadloperCart.php:108 private function getProductThumb(page $product) { $thumb = null; if ($product->padloper_images->count()) { // Get common ProcessWire thumb $thumb = $product->padloper_images->first()->height(260); } return $thumb; }
  23. Hi @kongondo, The price hook $this->addHookAfter('PadloperCart::getProductPrice', null, 'customProductPrice') is not applied completely. I have added it according to the documentation. It works as expected at first – When adding a product, the hook fires and changes the price in cart-edit and cart-view. But when proceeding to the checkout page, the stock price gets applied instead of the custom price. I think that is because the price of an ordered product is not stored in the database, only product ID and quantity. But the price should be saved too for the hook to work, right? The same goes for the customProductTitle hook.
×
×
  • Create New...