Jump to content

danrimer

Members
  • Posts

    28
  • Joined

  • Last visited

About danrimer

  • Birthday 04/17/1972

Profile Information

  • Location
    salisbury, uk
  • Activity
    User/Merchant

Recent Profile Visitors

2,351,961 profile views

danrimer's Achievements

  1. Another bump 🙂 I have been merrily charging VAT on all shipping until a customer pointed out that the VAT regulations to me! The majority of my goods are zero rated, so I looked into a solution for this. I couldn't find any of-the-shelf solution. My solution was to duplicate my existing shipping modules and set the tax rates to Standard/Zero in the backoffice. I have built my shipping modules myself based on the provided templates from PrestaShop. The module includes a section where the order's weight and value is calculated. I simply added a variable to record the highest tax rate in the order. At the end of the calculation, the module can be enabled or disabled depending on the requirements. It gets a little confusing since the descriptions in the backoffice are the same as the customer sees, so i don't want to call one "Royal Mail tracked 48 - no vat" and one "Royal Mail tracked 48 - with VAT"!! Here's the shipping calculation part of my module: public function getOrderShippingCost($params, $shipping_cost) { $address = new Address($params->id_address_delivery); $postcode = $address->postcode; $country = Db::getInstance()->getRow('SELECT `iso_code` FROM `'._DB_PREFIX_.'country` WHERE `id_country` = '.(int)($address->id_country)); $countryISO = $country['iso_code']; if ($countryISO == NULL) { $countryISO = 'GB'; //if country code is blank, assume UK mainland shipping. $postcode = 'insert local postcode here'; } if (($postcode == '') or ($postcode==NULL)) { $postcode = 'insert local postcode here'; } // before we do any calculations, we need to check the country and postcode if ($countryISO <> 'GB') return false; $postcode=str_replace(' ','',$postcode); $postcode=strtoupper($postcode); $postcode=substr($postcode,0,strlen($postcode)-3); if (preg_match(Configuration::get('rm48_novat_excluded_postcodes'),$postcode)) return false; // if we're here then we are good to go! $ordervalue = 0; $orderweight = 0; $tax=0; $products = $params->getProducts(); foreach($products as $product_info) { if ($product_info['rate']>$tax) { $tax=$product_info['rate']; // set $tax to highest rate } $orderweight=($product_info['weight']*$product_info['cart_quantity'])+$orderweight; $ordervalue=$ordervalue+($product_info['price']*$product_info['cart_quantity']); } //for the zero rated module use this line if ($tax>0) return false; //for the standard rated module use this line //if ($tax==0) return false; //my requirements do not include a low rate of tax, so zero and standard are fine for me! if ($orderweight>Configuration::get('rm48_novat_MAX_WEIGHT')) return false; $shipping_cost=Configuration::get('rm48_novat_rate'); $shipping_cost=$shipping_cost*(1+(Configuration::get('rm48_novat_FUEL_SURCHARGE'))/100); return $shipping_cost; } You'll see that the module uses return false; in order to disable itself. Hope this helps someone 🙂 dan
  2. Hi there Before switching to the ps_checkout module I was able to track the transactionIDs for PayPal payments directly in the PrestaShop database. I use a remote db connection to check for new orders etc and as part of my process, I check the emails received from PayPal with the transaction IDs that are stored in the ps_paypal_order table. I've managed to spot a few missed orders over the years with this approach. Now I am using PrestaShop Checkout for all my transactions, I cannot find anything in the database that looks right! The values that are in the ps_pscheckout_cart and ps_pscheckout_order_matrice tables, under the heading 'id_order_paypal' don't match anything on PayPal's website (or the emails I have received). Can anyone tell me how to get the (correct) transactionID from the database please?
  3. Yes, error reporting was turned on and debug mode too. Nothing showed. I'm hosting on my own cPanel server. There's obviously something funny going on since when I uploaded a copy of the entire website to another account on the cPanel server, it showed me the errors and claimed that GD library was missing. I've since added that to the standard site and everything works again. So even though you didn't actually fix it, something made me look at the problem in a different way, so thank you!
  4. Hi there I hope someone can help! I'm running PS1.6.1.24 on a cPanel server using PHP 7.0 I've been trying to clean out some of the old customers/orders from 10+ years ago and in doing so have obviously mucked something up. Everything on the store works. The front end is fine and most of the back end is fine. However, any time I try and view an order or a cart, I get a 500 error. I have tried enabling error reporting by using the debug switch and by enabling the show errors in php.ini but neither give me anything - I still get a generic error page (not the Prestashop 500 one) that says "This Page is not working xxx is currently unable to handle this request. HTTP error 500" The error logs in the site are almost empty. There are a few tiny errors relating to a problem with the front office, but nothing relating to this issue - nothing with a timestamp that's even close to when the error occurs! I have also tried removing all the modules from the /modules folder and putting them in /modules.bak to check that it's not module related. It doesn't appear to be! Thanks in advance! Dan
  5. @tdsoft Thank you for your reply. I AM logged into psaddon. Please see my screenshot - i've simply removed the second half of my email address in the picture. I agree, the symptoms appear the same as if I was not logged in, but the module list also says "install" rather than "discover". This proves that the login has worked. All my modules show up correctly (with the option to Install rather than Discover).
  6. @tdsoft Thank you for your reply. I'm the hosting provider. It's my dedicated server. AFAIK, Zip is enabled in PHP - that's why I showed the output from phpinfo(). Is there something I'm missing? I have tried uninstalling php_zip and reinstalling it. When it is uninstalled, the modules page fails silently when trying to install. Once reinstalled the page fails as above. Interestingly, if I try to add a free module (I just tried "Advertising Block") it works fine. It's just for the paid for modules that it doesn't work. Again, I can download the module to my PC and then install directly using the "Upload a module" button. The module installs perfectly (if slowly!).
  7. Hello I am a long time user of Prestashop. I am trying to migrate my store from 1.6 to 1.7 and have stumbled across this problem at the first step! I can't install modules that I have purchased from the addons website on my new server using the backoffice. If I go to the addons website and download them, I can then install them manually without problems. However, I would like to know where the problem lies so that it can be fixed! The image attached shows the error I receive when I try to install the BrainTree payments module that I have purchased. The error message is: "Error! Exception thrown by module braintreejs on install. Warning: ZipArchive::extractTo(): Invalid or uninitialized Zip object". I have tested the server using phpinfo() and zip support is included. Zip Zip enabled Zip version 1.15.4 Libzip version 1.1.2 If it helps, I have a dedicated server running cPanel with PHP 7.2, although my current site isn't residing on this server. Also, the test site has a different URL to the normal site - could this be the reason that the addons aren't being downloaded? I'm unsure where to go next. If anyone can point me in the right direction or if there's a better forum for this problem, please let me know! Thanks Dan
  8. Hi Thanks for the tip. That's not what I wanted... perhaps I didn't phrase the question correctly! PayPal does not allow payment to be made for products/services from Iran (not just the Iranian people). For example, if I have a blend of spices - of which only one of them comes from Iran, I cannot sell that blend using PayPal. I wondered if there was a mechanism available for disabling PayPal if the cart contains products that are in a certain category or similar... Thanks Dan
  9. Hello I have recently had a couple of emails from PayPal stating that I am selling items that *may* come from Iran. The items in question do not, but I wonder if there is a way of excluding PayPal checkout for items that are on their block list. Also, should I decide to sell a product sourced from Iran, how can I stop customers using PayPal for just that item? If I can't do the above, can I just present the PayPal gateway with a nondescript "goods" product and not use an itemised invoice? Thanks Dan
  10. Found the problem. Had someone from PeoplePerHour look at the site... turns out it was a javascript error in the theme! Thanks for your help. Dan
  11. Hello I've got an odd problem. Sometimes, for no apparent reason, when a random customer tries to buy a number of things from my website the checkout passes the quantities incorrectly to the payment module. This means the customer pays the wrong price and subsequently receives an email saying there's a problem (order total doesn't match the amount paid). For example, a customer bought 3 of one item and went to the checkout. She paid for them, but only paid for 1 and also paid the corresponding shipping rate for just 1 item. The order was stored on PS as 3 items and she received an email saying there's a problem (order total doesn't match the amount paid). Another customer bought 5 products, 1 of which was qty:6. He only paid for 1 of each of the 5 products. The order was stored on PS as 5 products with one of the line having qty:6, as it should have been... - he received an email saying there's a problem (order total doesn't match the amount paid). Is this something anyone has seen? If so, i'm guessing it's a theme issue... but how/why? Does anyone have any tips for troubleshooting this? I have put some logging in place by editing the credit card provider's module and dumping the contents of the basket and timestamp to a file, so I can see it is happening to some orders only. Try as I might, I cannot get it to happen myself! At least one customer is using an Apple Mac (he said it was latest version of osX and latest version of Safari). I would like to be able to add the browser and computer type to the logging, but as yet haven't figured out how! Thanks in advance Dan
  12. @Daresh. Thanks for the info. I've found a fair few posts about rounding errors, but as you say, this is whole GBP!! Quite often a PayPal order doesn't add up correctly, but that's because the PayPal module does the addition itself (and sends the entire invoice to the PayPal customer). I've received an order this morning for a dozen or so items. The customer was overcharged by £3.65!! The entire order only came to £20... I only have 1 item at £3.65 on my website and the customer did not even look at that item... So who knows what is going on!?
  13. Hello I don't know if this has been asked before... I have searched a great deal and come up empty, so I'm guessing not! I have an intermittent problem where a customer's order total is different to the total requested from the payment module. If the customer proceeds, their order is highlighted as "Payment Error" and they are sent the usual email (and their order is not activated). Sometimes the value is higher and sometimes lower. It is different by a couple of GBP and not just pence that could be written off. The biggest problem is that I haven't been able to recreate the error. I've tried switching all the caching settings on/off including all the possible permutations to no avail. Of course the customers have no idea if they have "done something" or if an error had occurred just before checkout etc!! I have a log file being generated by the payment module and as expected, the amount is the same as the amount charged to the card and is different to that shown on the website! If anyone can help, I'd be really grateful!! Cheers Dan
×
×
  • Create New...