Jump to content

SparkyRih

Members
  • Posts

    41
  • Joined

  • Last visited

About SparkyRih

  • Birthday 08/30/1991

Contact Methods

Profile Information

  • Location
    Roermond
  • Activity
    Developer

Recent Profile Visitors

615 profile views

SparkyRih's Achievements

  1. I have written a .NET application which communicates with my PrestaShop webshop. I developed this application for 1.5.x a long time ago. Now I started working on a new version for 8.0.1, but due to lack of time didn't finish it. I recently upgrade my webshop to 8.1.0, and started working on the .NET application again, but the filters don't seem to work anymore... I did not make any changes in my application, just fired it up... This is an example of a URL which is used to obtain the products for a specific category: `https://<url>/api/products?filter[id_category_default]=[10]filter[available_for_order]=[1]filter[active]=[1]filter[online_only]=[0]&display=full` It just returns all my products (also the inactive ones). When I remove the `&display=full` parameter, it just returns nothing. Even this one, just returns all categories, instead of just (in my case) 3 main categories: `https://<url>/api/categories/filter[id_parent]=[2]&display=full` Is this a bug, or has something changed in the API (I cannot find Qanything about that in the documentation).
  2. I've been using PrestaShop 1.5 for years now, and I finally got to building a completely new webshop. Running it on PHP 8.1 and Prestashop 8.0.1 now. However, I have a physical store, and the software in my store directly retrieves all product data from my webshop, so I use the webservice. Since I make this big (and very necessary) update, I needed ot update my application (C#, I used a library which is not maintained anymore, so I wrote the client myself this time). Pretty much all routes return expected data. But when I try to retrieve product attributes, I get a 500 internal server error: I think this message belongs to that error: [Wed Apr 12 18:15:59.580186 2023] [proxy_fcgi:error] [pid 269400:tid 139648407209536] [client 192.168.20.2:58510] AH01071: Got error 'PHP message: [PHP Warning #2] Trying to access array offset on value of type bool (/var/www/clients/client1/web1/web/classes/webservice/WebserviceRequest.php, line 1331)PHP message: [PHP Warning #2] Trying to access array offset on value of type bool (/var/www/clients/client1/web1/web/classes/webservice/WebserviceRequest.php, line 1332)PHP message: [PHP Warning #2] Trying to access array offset on value of type bool (/var/www/clients/client1/web1/web/classes/webservice/WebserviceRequest.php, line 1333)PHP message: [PHP Warning #2] Trying to access array offset on value of type bool (/var/www/clients/client1/web1/web/classes/webservice/WebserviceRequest.php, line 1334)' The routes I tried using: - /api/products/[product_id]/combinations/?display=[attributes] - /psapi/product_option_values?display=[id_attribute]&filter[id_product]=[product_id]&filter[id_product_attribute]=[combination_id] Am I doing something wrong, is this a known or unknown bug?
  3. So when I do this request: /api/order_details?filter%5Bid_order%5D=%5B1846%5D&display=full I get this result (I took just the part of interest) ... [product_weight] => 0.000000 [tax_computation_method] => 0 [id_tax_rules_group] => 1 [ecotax] => 0.000000 [ecotax_tax_rate] => 0.000 [download_nb] => 0 [unit_price_tax_incl] => 109.950000 [unit_price_tax_excl] => 91.000000 [total_price_tax_incl] => 109.950000 [total_price_tax_excl] => 109.950000 [total_shipping_price_tax_excl] => 0.000000 [total_shipping_price_tax_incl] => 0.000000 ... As you can see total_price_tax_excl is the same as total_price_tax_incl. You can also see the unit price is correct. So is this a bug, or is there a hidden setting somewhere (can't imagine). PS version: 1.7.6.2
  4. So when I do this request: /api/order_details?filter%5Bid_order%5D=%5B1846%5D&display=full I get this result (I took just the part of interest) [product_weight] => 0.000000 [tax_computation_method] => 0 [id_tax_rules_group] => 1 [ecotax] => 0.000000 [ecotax_tax_rate] => 0.000 [download_nb] => 0 [unit_price_tax_incl] => 109.950000 [unit_price_tax_excl] => 91.000000 [total_price_tax_incl] => 109.950000 [total_price_tax_excl] => 109.950000 [total_shipping_price_tax_excl] => 0.000000 [total_shipping_price_tax_incl] => 0.000000 [purchase_supplier_price] => 0.000000 As you can see total_price_tax_excl is the same as total_price_tax_incl. You can also see the unit price is correct. So is this a bug, or is there a hidden setting somewhere (can't imagine). PS version: 1.7.6.2
  5. I did an upgrade attempt yesterday, but I'm getting stuck with this error: "classes/PhpEncryption.php line 116 - Call to undefined function openssl_get_cipher_methods()" My php.ini (of PHP5.6.30) appears to be configured correctly.
  6. So, I've ignored upgrading my store for years now, mostly because I stopped due to other projects. About a year ago I "restarted" the business, and started using my webshop again. But now it's time to completely refresh it, and first thing to do is upgrade it. So I'm currently running version 1.6.1.2 on PHP-FPM 5.6. I maintain my own server and my primary PHP version is 7.2 (so I can switch with one click of a button to this version of PHP). However, PrestaShop 1.6.1.2 does not seem to run on PHP 7.2, so my question. What's the best way to start upgrading? Are there key versions which I can upgrade to first, for example: Upgrade to PS 1.6.1.10, then switch to PHP 7.2, and than upgrade to PS 1.7.6? Any advise on what to do?
  7. displayCarrierList, from that hook I can do what I want in the front end... Thanks for your support...
  8. I found an article on PrestaShop "Carrier modules - functions, creation and configuration". Using that I managed to set up my entire back-end already, it lists all existing carriersi n PrestaShop, and adds information in my module... Also I didn't forget about the updatecarrierHook(), so that's all working nicely... Only thing I'm looking for now is the front-end function to push a static address to the shipping address fo the customer if a certain carrier is selected... And how to slightly alter the table layout of the carrier...
  9. I'm trying to work out an idea for a new module, but I'm not sure which aproach I should take to create it... The idea is pretty simple, I want to create a module which supports several carrier API's (PostNL, GLS, DPD, DHL etc.) most of them will be Dutch/Belgian (for now)... If a customer of the shop wants to have his parcel delivered to a nearby post office, I need this address to be set as shipping address. I'd like to have the shop owner create a carrier just like he's used to via the PrestaShop settings. In my module backend all the carriers will be listed, per carrier the shop owner should be able to choose connect this carrier to one of the API's (or fill in a static address)... In the front end, the user should get some extra options per carrier (like a dropdown menu with addresses of nearby post offices, which I will retrieve from the API's). I've read the PrestaShop documentation, but from what I understand, I have to create an entire new carrier to do this? Or can I add a couple of extra fields to an existing carrier? Maybe I can easily add an extra step to the PrestaShop carrier editor? I'm not looking for any code, just some pointers to what I should look into/read...
  10. Nevermind, I found the solution by reading the helperForm.php file, it's actually pretty easy: For some reason I can't paste anything, so pretty much what I needed to do is: Add the tabs in the forum: 'tabs' => array( 'TAB1' => 'General', 'TAB2' => 'Next tab' ), And than put the controls in their tabs 'input' => array( array( 'type' => 'switch', 'tab' => 'TAB1', ), ),
  11. I'm using the helperForm() to create 4 forms which are displayed on one page, they all have their own submit button (which submits all forms at once)... So I'd like to split these forms into tabs rather than put them on one page... I can't find any info, or any module that implements this so that I can look at any example...
  12. We've tried creating an exact clone of their production environment, without any luck? Nobody here can point me in any direction?
  13. I wrote a module for a Dutch payment gateway (AfterPay). The module is currently in use in several PrestaShop webshops in The Netherlands an Belgium. But for one client, it won't work properly. They use one other payment gateway (IcePay, which breaks down multiple payment methods via that gateway, except for AfterPay). So that's why they need my module. In their test environment, my module and IcePay work perfectly fine alongside each other, as well as on my own development server. But in their production environment they don't... The IcePay module obviously works fine, when they disable it, and install AfterPay, that module works fine as well. But when they try to enable both modules, all payment methods will disappear in the front end. I can't find any leads, any errors, warnings in any logs... Does anybody have an idea on where I can look to resolve this issue for my client? BTW, I've asked PrestaShop support, but they say that "I have to contact the developer".
  14. I'm developing a payment module for a payment gateway organization. They want their customers to have the option to add extra costs if they use their gateway... But I need the extra cost to show up in the cart when the order is placed... But there is no function for that (I understand why)... So what would be the best method to add an extra "payment fee" to the cart?
×
×
  • Create New...