Jump to content


  • Posts

  • Joined

  • Last visited

Guillaume's Achievements


Apprentice (3/14)

  • Dedicated Rare
  • Conversation Starter Rare
  • First Post Rare
  • Collaborator Rare
  • Week One Done Rare

Recent Badges



  1. Hi, Would really appreciate any insight anyone may have here. Is there any way to clearly rule out, from Cubecart's perspective, whether the cookies are deleted? E.g. can I look for a cookies log in Cubecart? What I am not getting in the first response is "CubeCart does not know what the customer_id is supposed to be". I believe it does, because the customer is still logged, and his cart is still present (besides the order being recorded in his account). I am rather under the impression that when the ?_a=complete is called, for some reason the cart is not emptied, possibly because it is called incorrectly. However, I am not sure how to verify that... Any hint very appreciated. Best regards, Guillaume
  2. Hi, Thanks a lot for your feedback - really appreciate your help. I was trying so far with Firefox, and don't think I have any such add-on. I tried with Chrome (where I have no add-on for sure), same result. I am not really sure what to do next: how are IPN usually managed in the case the user closes the window? I'm afraid I can't really test to that extent on other gateways, as I would need a test key to get the payment through. What really puzzles me is that the IPN seems to be taken into consideratio, as the function call() is used indeed (I can see that as it logs the transaction). But solely when it comes to emptying the cart that fails. Could there be anything wrong with the cart emptying command we've defined? Cheers, Guillaume
  3. Hi, Thanks a lot for this detailed answer. The way I understand it is, that whenever a customer comes back to Cubecart, Cubecart will try to retrieve from the database their basket. This would explain that merely deleting the cart from the session (with the below) does not work, because Cubecart would subsequently retrieve the cart from the DB and put it back in session: $GLOBALS['session']->clear(); $GLOBALS['session']->delete('basket'); Now I've tried the below, which you suggested, but for some reason it does not work: $GLOBALS['db']->delete('CubeCart_saved_cart', array('customer_id' => $order_summary['customer_id'])); $GLOBALS['cart']->clear(); I've checked and the instruction seems corect, as in the logs the customer_id is correctly filled in, both for the cart and the order_summary. What also puzzles me is that I have the below instruction (where redirection is towards the index.php?_a=complete page) in my code: httpredir($redirection, '', true, 200, true); Where you mentioned a cart clearance is conducted. That works perfectly when I don't close the window. But for some reason it deosn't when the window is closed. I guess my next step is to read the database and make sure the instruction in database is correctly executed. Guillaume
  4. Hi, This is a continuation of this topic: So I have developped a payment module, which has a gateway.class.php file with a call() function in it. This time, my call() function is called, I know it as I log transaction notes, and they are exactly reported as instructed in such function. However, on the payment gateway: If I let the payment page go through and come back to the store URL, the order is indeed registered and the cart is emptied If I close the window after the payment is accepted, although the order is registered, the cart is not emptied What puzzles me is that the transaction logs are filled in as instructed in the call() function, and right below this instruction which I know is processed, I have put a: $GLOBALS['cart']->clear(); But in case 2, the cart is never emptied. And to be very honest, even commenting the above instruction e,ptying the cart, in case 1 the cart is emptied nevertheless. Any hint on how I could make sure the cart is emptied? Best regards, Guillaume gateway.class.php
  5. Thanks that was very helpful! The error log showed several similar notices and warning (benign, as you said) and one exception regarding a call which is made to Parcel2Go. Deactivating the Parcel2Go module, everything now works normally. I am copying the Parcel2Go error below. It might be that everything failed because we backed up recently and there were no setting filled in in that module, although it was activated. Thanks a lot again! [<strong>Exception</strong>] /home/clients/730d21bd55854ec4d0c02aa159bd4077/sites/www.temp-alerte.com/modules/shipping/Parcel2Go/shipping.class.php:25 - SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://v3.api.parcel2go.com/ParcelService.asmx?WSDL' : failed to load external entity "https://v3.api.parcel2go.com/ParcelService.asmx?WSDL" https://www.temp-alerte.com/index.php?_a=confirm
  6. Thanks for the prompt answer. Here we go: The only update I have made to the SMARTY template is in admin/index.inc.php, I have the following: $GLOBALS['smarty']->assign('STORE_URL', CC_STORE_URL); I am not sure where the System Error Log is displayed? Is that in the admin panel? I didn't find the error log you are referring to Regarding the PHP error log, I followed the procedure you mentioned on the forum linked you posted. And I got the enclosed error log. What really puzzles me is that the error seems to be referring to functions and variables which are core Cubecart and which (to my knowledge) I have not touched Any thoughts? error_log
  7. Hi, I know I should probably give more details, but I don't know exactly where to start the investigation. For a reason which I ignore, I am getting a blank page on index.php?_a=checkout (when trying to proceed with the cart recap right before payment page) and on index.php?_a=confirm (when trying to add an item to the basket). I believe it's solely a php issue (nothing coming from the back-end), as I can still proceed with payment by anually changing the URL to index.php?_a=gateway. After payment I am redirected to index.php?_a=complete and can see the order summary - no problem. I tried doing a back-up of my Cubecart folder to a date where things worked ok, but it didn't help. Maybe I did it wrong though... I usually get this blank page whenever my code has a syntax error. I'd like to be able to check the file which drives these index.php pages. The file index.php looks absolutely ok and hasn't been touched for a while. Any hint as of where I could start investigating from would be very welcome! Guillaume
  8. Sorry, I should have tried this before asking. What you describes worked perfectly indeed!
  9. Cheers, I used the following in admin/index.inc.php: $GLOBALS['smarty']->assign('STORE_URL', CC_STORE_URL); And was eventually able to re-use it in skin/admin/index.tpl. For a reason I did not understand, I was not able to assign other variables. But I didn't investigate that much, as I have enough with $STORE_URL and $VAL_SELF
  10. Hi, On the payment gateway I am developping, I am trying to define cool default values for the admin, so that they need to configurate only the very minimum. In particular, for the return URL, I'd like to set a default value equal to $GLOBALS['storeURL'] . '/modules/gateway/MyGateway/return.php' But how can I access such a global variable from index.tpl? I have seen a couple of global variables being called in index.tpl, e.g. $VAL_SELF, $SESSION_TOKEN, etc. but the naming did not seem to match what is used in php. Appreciate any help! Best regards, Guillaume
  11. Hi, In my payment gateway, for safety reasons, I would like to check the form's signature (to ensure the response is genuinely from the payment provider). For that purpose, I need to use a couple of settings which are input by the admin of the module's settings page, namely: the certificate, the mode (test or prod) and the encryption algorithm). But while a simple $mode=$this->_module['mode'] works perfectly in fixedVariables() function, it stays empty when called in call() function. I have tried the below, but with no luck: $this->_module = $GLOBALS['config']->get($module); Is there any reason why I need to specifically call the module's settings differently in that function? Best regards, Guillaume
  12. In some payment gateways, the function call() seem to be used to process the payment, while in some others it seems to be the function process(). Looking at cubecart.class.php, I found the following (rom line 278 onwards): if (file_exists($class_file)) { include $class_file; $gateway = new Gateway($GLOBALS['config']->get($module)); $command = (isset($_GET['cmd'])) ? strtolower($_GET['cmd']) : null; if (!empty($command)) { # if (method_exists($gateway, $command)) $gateway->{$command}(); switch ($_GET['cmd']) { case 'call': if (method_exists($gateway, 'call')) { $gateway->call(); } exit; break; case 'process': if (method_exists($gateway, 'process')) { $gateway->process(); } break; } } } My interpretation of this is that there is a variable $_GET['cmd'] depending on which either the function process() is used, or the function call(). However, I couldn't find much information about this variable, studying the code. I would apprecate if anyone could enlight me on what exactly it does, as this would make my understanding clearer of when exactly each of these functions are called. What I am especially after is, when exactly each of these functions are called. Is call() used when the payment providers gets back to the merchant? And process() used when the payment has been accepted (i.e. independently of the user closing the window)? What puzzles me is that this piece of code is in a function loadpage(), which implies that it is tighted to the UI experience. Best regards, Guillaume
  13. Thanks. That would make my plugin somewhat dependant on the plugin "Additional Product Fields", but this is an interesting idea, I'll give it a try!
  14. Thanks. I haven't yet come to a solution which gives me full satisfaction. Nevertheless, the below comes in handy: #URL encoding of all values except email and URL foreach ($hidden as $key => $val){ if ($key != "vads_cust_email" and substr($key, 0, 8) != "vads_url") $hidden[$key] = urlencode($val); } In other words, I encode with urlencode all the values of the form, except URLs and emails.
  15. I hqve solved this one a long time ago, so for anyone interested, here below is what I have done: #Calculation of several currency characteristics $currencyCode = $GLOBALS['tax']->_currency_vars['code']; #Numeric currency calculation $currency_records = $GLOBALS['db']->select('CubeCart_currency','iso',array('code' => $currencyCode)); if ($currency_records !== false) $numericalCurrency = $currency_records[0]['iso']; #Exchange rate calculation $currency_records = $GLOBALS['db']->select('CubeCart_currency','value',array('code' => $currencyCode)); if ($currency_records !== false) $exchange_rate = $currency_records[0]['value']; #Decimals calculation $currency_records = $GLOBALS['db']->select('CubeCart_currency','decimal_places',array('code' => $currencyCode)); if ($currency_records !== false) $decimal_places = intval($currency_records[0]['decimal_places']); Retrieving the decimal places is important as pmost payment gateways do not use the dot or comma sign and expect an amount of USD 12.45 to be sent as "1245" (hence it is important to know how many decimals the currency has).
  • Create New...