Jump to content

ChrisColeman

Member
  • Posts

    110
  • Joined

  • Last visited

  • Days Won

    1

ChrisColeman last won the day on June 4

ChrisColeman had the most liked content!

Profile Information

  • Gender
    Male
  • Location
    Hereford

Recent Profile Visitors

5,706 profile views

ChrisColeman's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later Rare

Recent Badges

1

Reputation

  1. Hi, A confession .. Even though there is an error as reported - That was not the cause of my problem. The skin I'm using does not use JQUERY, I'm not a fan. It has worked without issue for 5+ years. Anyway it turns out that paypal_commerce has a dependency on a jquery file being present in the currently active skin (??). So thats it I replaced a JQUERY file into my skin and it now works. Chris. ps. I have posted on GITHUB.
  2. Hi, I just tried this again with with PayPal Commerce 1.6.2 and still no joy, therefore I downloaded the 1.6.2 code to get a better look .. And this is what I found - /** * CubeCart v6 * ======================================== * CubeCart is a registered trade mark of CubeCart Limited * Copyright CubeCart Limited 2019. All rights reserved. * UK Private Limited Company No. 5323904 * ======================================== * Web: http://www.cubecart.com * Email: [email protected] * License: GPL-3.0 http://opensource.org/licenses/GPL-3.0 */ function ppcp_body_js($tpl_output, Smarty_Internal_Template $template) { $skins = $GLOBALS['gui']->getSkinData()['info']; // $skin = $GLOBALS['gui']->getSkinData(); if (($pp_config = $GLOBALS['cache']->read('pp_config.'.$skins['name'])) === false) { if(file_exists('modules/plugins/paypal_commerce/config.custom.json')) { $pp_config = file_get_contents('modules/plugins/paypal_commerce/config.custom.json'); } else if(file_exists('modules/plugins/paypal_commerce/config.'.$skins['name'].'.json')) { $pp_config = file_get_contents('modules/plugins/paypal_commerce/config.'.$skins['name'].'.json'); } else { $pp_config = file_get_contents('modules/plugins/paypal_commerce/config.foundation.json'); } $GLOBALS['cache']->write($pp_config, 'pp_config.'.$skins['name']); } if(isset($GLOBALS['cart']->basket['total']) && $GLOBALS['cart']->basket['total'] > 0) { $pp_amount = $GLOBALS['cart']->basket['total']; } else { $pp_amount = "null"; } return preg_replace('/\<\/body\>/i','<script id="pp_config" type="application/json">'.$pp_config.'</script><script> var pp_config = JSON.parse(document.getElementById(\'pp_config\').textContent) var pp_amount = '.$pp_amount.';</script></body>', $tpl_output); return $tpl_output; } $GLOBALS['smarty']->registerFilter("output","ppcp_body_js"); On about the third line of code you can see I have replaced a line. Now the thing is that this was never going to work the variable '$skin' is never referenced in the code so its clearly in error. The question is why did nobody else experience the same ? Its probably because, and this is just a guess, many other skins are strongly based upon the foundation skin, but as I say that's only a guess .. Anyway it seems to be working now but no production test yet.. Chris.
  3. Hi, I have regressed the sites in question to PayPal standard which works as it did and will do a bit of digging. So must be using a different jquery - or non at all which would be better. On the subject, I don’t not if the send/receive loop is good - should it not anticipate an error or at least wait a while before resending the request. I have some history with Stripe which is not entirely different and it is usual to await an acknowledgement before resending the request?
  4. I have several sites running the replacement PayPal Gateway .. However a few day ago I attempted to activated on a couple of additional sites and this morning received complaints that customers can no longer complete the checkout process on those sites. In the browser log I see (see below), which repeats (ad infinitum) - Any ideas .. Just noticed this error - Many Thanks. Chris.
  5. One of my clients (well 2 actually ) wish to stop shipping to the EU altogether. At the moment the following zones are present - How can I remove the shipping zone for the EU without it becoming part of @Rest of [email protected] Or to put it another way if I delete the EU zone will it become part of the 'rest of world' zone, and if it does how do I prevent shipping to the EU ? Many Thanks, Chris.
  6. CubeCart 6.4.4, recently upgraded. When we change/add a product the changes do not show unless we go to the maintenance section and manually 'Clear Cache', is this an issue or is it supposed to be like that ? Also since the upgrade the Clear Cache at right hand top of window has disappeared, but I guess that was planned? Chris.
  7. Ok got it - // Can use 1 or 0 as boolean in smarty .. !empty($GLOBALS['session']->session_data["customer_id"])?1:0; Thanks (me), Chris.
  8. Hi CubeCart People, hopefully simple question .. I'm changing the contact form on a site so user has to be logged-in to use it - this because a lobotomized BOT has gotten hold of the form and is sending just a few unsavory messages every day to site-admin. Well we don't see it as a big deal to force users to login before using the contact form, but how do I determine if a user is logged in (or not), or to put it another way if a login session is active ? For your info I will use hook: class.cubecart.contact to send different content when the user is not logged in. Thanks and Regards, ChrisColeman.
  9. Ok a simple follow up .. Maybe I have a set of variables for a mobile platform, which I need to send to each HTML page. I would like to be able to pass the $_SESSION data between pages (server side) and normally (?) I would use $_SESSION to do that. Maybe I'll use SMARTY to extract the data and send to the page - infact definately I would use SMARTY so I need to be able to get/set the $_SESSION variable within the plugins/hooks system with which I am familiar. How would I hande the $_SESSION array in CubeCart, I'm guessing that its not so complicated but rather than diving into the CubeCart code and then maybe coming up with the wrong answer would appretiate some 'inside info'. Thank You - No Rush - I'm taking a breather until the New Year. Chris.
  10. Ok thats great. I guess i'll leave it until I have more time, then I'll take another look at fixing the missing keys - Not a big deal at the moment as everything is running fine and a lot of spare capacity on the server .. Thank You, Chris.
  11. Yes I think that might just do it ... Oh by the way can i use $_SESSION variables to store variables or does CubeCart have a different methodology? Many Thanks, Chris.
  12. Hi, I recently upgraded a store (6.1.11 to 6.1.13) which is now using PHP Version 7.0.26, it is running well, taking orders and nothing bad showing in the logs. But I recently looked in the 'database maintenance' section and see the following for many of the tables, any ideas - Thanks in Advance - Chris.
  13. Ok well perhaps that was not a good example, what if I wanted to display a different navigation on handheld devices, nothing to do with the width of the platform just a different 'look & feel' ? Chris.
  14. Yes I guess, but media queries can give the size but not the platform. There is a 'handheld' media type but thats rarely usefull because the mobile user-agents rarely use it. If for example I wished to change text size on parts of the page but only on handhelds it is difficult using media queries.. Chris.
  15. I was just wondering if there is anything 'built in" to cubecart which detects if user-agent is a mobile (ie. tablet, phone, etc.. ). I can do that my self but that would be pointless if its already present. Many Thanks, Chris Coleman.
×
×
  • Create New...