-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
160
Everything posted by kongondo
-
Padloper 003 has been released. It includes the Addons feature.
-
Print/Email Invoice throws Error
kongondo replied to gs-df's topic in ProcessWire Commerce (Padloper) Support
Hi @gs-df, Just to let you know that Padloper 003 has now been released. -
Hi @Sonia Margollé, Currently, Padloper does not have a Gift Card feature. However, there are a number of ways you can implement this feature yourself. A gift card can be thought of as a special product. Hence, you can use a product as a gift card. The main challenge in this regard is you will need a single product per gift card, since gift cards need to be unique and cannot be reused. By client here I assume you mean the shop owner/admin? I am sorry I don't understand this statement. Who is the user here? The shop owner/admin or a frontend customer? Yes, this approach might work. Below, I discuss this and other possible approaches. Property Approach It would mean, perhaps, creating a property called 'Gift' and a dimension called 'Worth'. You can then add these to a product as a property as illustrated below. The main challenge with this idea is it can be confusing to the shop admin since they'll have to add this as a property. In addition, it is possible to add more than one property which might confuse the shop admin even more. However, you might want to add more properties for other aspects of the gift card, e.g. a unique number. Custom Field(s) Since Padloper products are also pages, it is possible to add extra field(s) to a product page template. Once you retrieve the Padloper page, you are able to access that/those field(s) as any other field. This approach is very versatile. You can use existing ProcessWire fields such as integers, texts, etc but can also create a custom field to store and edit your gift card information. One issue with this approach is that if you have products that are not gift cards, they will also have the gift card field(s) added to them even if they don't need them. This can confuse shop admins. Custom Addon A third approach is to use the new Padloper feature for Addons. This is probably the most powerful of these approaches and gives you complete freedom whilst still allowing you to utilise (hidden) pages and (custom) fields. I have some questions: Are these gift cards redeemable in the same shop or other shops or both? I.e., is your client selling gift cards or offering them for free to customers? Are the gift cards partly redeemable or need to be used once? Yes, they are already implemented. Are you not able to add properties to your products? Currently these are not displayed in the demo site, although properties do exist. I can give you access to the backend of the demo site if that will be helpful. Thanks.
-
Addons docs are now up. I hope to upload the latest Padloper files by tomorrow. I need to do some final tests before they are ready. Thanks.
-
Print/Email Invoice throws Error
kongondo replied to gs-df's topic in ProcessWire Commerce (Padloper) Support
Hi @gs-df, I recently noticed this when testing another user's install and came up with a fix. My plan was to release the fix alongside other incoming features. I hope to do so by tomorrow. Yes. Actually, just slopping coding on my part ?. What was happening in the other user's case, and I suspect it is the same situation in your case, is that Padloper was installed but the downloads feature was not selected for install. Hence, the table padloper_download_codes is not available. However, when you try to print or email an invoice, Padloper is also attempting to fetch downloads for that order, if any are available. It checks the table padloper_download_codes but there is no such table, hence SQL throws the error. I'll let you know when the updated files have been uploaded. You will then be able to re-download Padloper using the link that was sent to you after your purchase. After that, it is just a case of overwriting your existing install with the new files. Thanks. -
Introducing Flutter 3 The culmination of our journey to multiplatform UI development on phone, desktop, and web We’re delighted to announce the launch of Flutter 3 as part of the Google I/O keynote. Flutter 3 completes our roadmap from a mobile-centric to a multiplatform framework, with the availability of macOS and Linux desktop app support, along with improvements to Firebase integration, new productivity and performance features, and support for Apple Silicon. https://medium.com/flutter Game, set and match?
- 35 replies
-
- 2
-
-
Introducing Padloper Addons Addons allow you to easily extend the functionality of your Padloper Shop. All you need is to drop your addon files (.php) in /site/templates/padloper/addons/. There are currently two broad types of addons: Payment Addons and 'Custom Addons'. Addons only need to implement the PadloperAddons Interface. Payment addons must also extend the abstract PadloperPayment Class. That's it. With addons, your shop admins can perform various tasks without leaving the context of the shop. Your addons have access to the powerful ProcessWire and Padloper APIs. You can build anything you want. You are only limited by your imagination, or your budget, should you want me to develop a custom addon for you ?. Documentation is in the works, ready sometime this week. Once this is done, I'll release the latest Padloper that includes this feature. Below, a video demo of a few addons I developed to showcase this new feature. Please note that the addons demoed in the video are not part of the official Padloper distribution. Can't wait to see what you guys will build?.
-
Somebody else has tested on 3.0.200 and it works fine. The only main difference I know of so far is both @Jan Fromm and the other tester's sites are not multilingual or at least currently have English as the default language. Might not be related, but worth mentioning. I'd also like to rule out any other third-party modules you might have maybe?
-
The examples on their website don't seem to work? Thanks for these resources!
-
Hi @csaggo.com, I'm stumped on this one as I cannot replicate and this is a ProcessWire core Inputfield. In addition there are no JS errors to help us. Yes. This is inserted by ProcessWire itself. That's doesn't work if there is no current saved property (i.e. it won't delete and empty property line). So, that's the expected behaviour. The only thing I can think of now is to request other users to test on their environments. That will tell us if the issue is local to your environment, at least. I can also check your setup again if I can get access but not sure that is immediately helpful. @Jan Fromm, @Kholja, @alexm. Sorry to tag you like this. With respect to the issue above, are you able to please test if adding properties to products works in your case? Does the search kick in? Many thanks.
-
Hi @alexm, This template file will receive $order as well as $orderLineItems, $orderCustomer and a bunch of other variables shown below: <?php namespace ProcessWire; /** @var WireData $order */ /** @var WireArray $orderLineItems */ /** @var float $orderSubtotal */ /** @var bool $isOrderGrandTotalComplete */ /** @var bool $isOrderConfirmed */ Payment info is in $order. We save the title of the payment method. You can use that by itself or use it to grab the payment gateway/method page itself (e.g. if you want the ID for some reason. Here's an example: <?php namespace ProcessWire; // COMPLETED ORDER /** @var WireData $order */ bd($order, __METHOD__ . ': $order at line #' . __LINE__); // PAYMENT GATEWAY/METHOD TITLE /** @var string $order->paymentMethod */ bd($order->paymentMethod, __METHOD__ . ': $order->paymentMethod at line #' . __LINE__); # OR ALIAS /** @var string $order->payment */ bd($order->payment, __METHOD__ . ': $order->payment at line #' . __LINE__); /** @var string $paymentGatewayTitle */ $paymentGatewayTitle = $order->payment; /// GET ID OF PAYMENT GATEWAY/METHOD /** @var int $paymentGatewayPageID */ $paymentGatewayPageID = (int)$padloper->getRaw("template=payment-provider,title={$paymentGatewayTitle}", 'id'); bd($paymentGatewayTitle, __METHOD__ . ': $paymentGatewayTitle at line #' . __LINE__); bd($paymentGatewayPageID, __METHOD__ . ': $paymentGatewayPageID at line #' . __LINE__); // IN CASE YOU WANT THE PAGE ITSELF FOR SOME REASON /** @var Page $paymentGatewayPage */ $paymentGatewayPage = $padloper->get("template=payment-provider,title={$paymentGatewayTitle}"); bd($paymentGatewayPage, __METHOD__ . ': $paymentGatewayPage at line #' . __LINE__); Hope this helps.
-
Hi @Jan Fromm, That's the expected behaviour. This is because for a successful order checkout, when /checkout-custom/success/ is called, the order has been finalised hence Padloper clears the sessions related to the successful order. Hence, $padloper->getOrderTotalAmount() finds nothing. In fact, if you reload the page at this point, you will be redirected to the shop's homepage as their is no current 'cart'. There's at least two ways to do this. order-products-table.php template receives a number of template variables: <?php namespace ProcessWire; /** @var WireData $order */ /** @var WireArray $orderLineItems */ /** @var float $orderSubtotal */ /** @var bool $isOrderGrandTotalComplete */ /** @var bool $isOrderConfirmed */ We can use those to calculate the order amount minus taxes and shipping. Method #1: ADD TOTAL PRICE OF EACH LINE ITEM <?php namespace ProcessWire; // init empty total price $totalPriceMinusTaxesAndShipping = 0; foreach ($orderLineItems as $orderLineItem) { // @note: there are also aliases to line item 'totalPrice' // if you prefer, i.e. 'lineItemTotalPrice' and 'orderItemTotalPrice' // ------- // add price of each line item /** @var WireData $orderLineItem */ $totalPriceMinusTaxesAndShipping += (float) $orderLineItem->totalPrice; } // @debug: here is your total price without taxes and shipping // @note: if you applied discounts, those will be reflected in this value bd($totalPriceMinusTaxesAndShipping, __METHOD__ . ': $totalPriceMinusTaxesAndShipping at line #' . __LINE__); Method #2: GET ORDER SUBTOTAL AND MINUS ORDER TAX TOTALS <?php namespace ProcessWire; /** @var array $orderTaxTotalsArray */ // get all the taxes applied to order // this returns 'tax_name' => 'total_tax_applied' values $orderTaxTotalsArray = $padloper->getOrderTaxTotals($orderLineItems); // sum the tax totals $orderTaxTotals = array_sum($orderTaxTotalsArray); // $orderSubtotal = order_total + tax_total (it doesn't including shipping) // subtract taxes from order subtotal $totalPriceMinusTaxesAndShipping = (float) $orderSubtotal - $orderTaxTotals; // @debug: here is your total taxes bd($orderTaxTotals, __METHOD__ . ': $orderTaxTotals at line #' . __LINE__); // @debug: here is your total price without taxes and shipping bd($totalPriceMinusTaxesAndShipping, __METHOD__ . ': $totalPriceMinusTaxesAndShipping at line #' . __LINE__); Hope this helps.
-
module Pages Export (export PW 2.x - import into PW 3.x)
kongondo replied to kongondo's topic in Modules/Plugins
Hi @planmacher, I haven't tried, unfortunately. Maybe you could test for us? ?. Thanks. Please backup your existing site first, as usual. -
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.
-
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.
-
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.
-
EU taxes for digital products
kongondo replied to Jan Fromm's topic in ProcessWire Commerce (Padloper) Support
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. -
EU taxes for digital products
kongondo replied to Jan Fromm's topic in ProcessWire Commerce (Padloper) Support
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. -
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; }
-
Paginated variants on product edit screen
kongondo replied to alexm's topic in ProcessWire Commerce (Padloper) Support
Thanks for confirming! Looking forward to seeing your 700+(??) variants ?. Probably the heat wave mate ?. Seriously though, glad it's working. -
Paginated variants on product edit screen
kongondo replied to alexm's topic in ProcessWire Commerce (Padloper) Support
Any reason why you installed the latest version on top of the older version instead of overwriting the files in the original install?