Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 05/20/2019 in all areas

  1. 1 point
    The new domain will be considered a new site. If you own both domains then you can implement a 301 redirect of the old domain to the new, that will preserve most of the value built up by the old domain and transfer it onto the new domain. fixed.
  2. 1 point
    peterbuzzin

    PayPal App timing out?

    Hey @Smoky Barnable, Think I can help you with this too. The Express button and the Login button are two different beasts. As always please backup before making any changes and test all changes after. Express Button The Express button specifics vary depending on how you have it configured, whether it's dynamic or static. If it's static then it is an image that's loaded from paypalobjects.com but is done in the old fashioned way of <img src="https://www.paypalobjects.com/...."> so not much can be done about that other than to save the image and then upload it to your server so it's served locally which will speed up display. You'll need to change the definition for this URL found in includes/apps/paypal/languages/english/modules/EC/EC.php on line 22 approx. All of these changes are based on 5.018 of the stock osC PayPal App (not Frozen etc) From: module_ec_button_url = https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-medium.png To (as an example): module_ec_button_url = https://www.mydomainname.com/images/buttons/checkout-logo-medium.png However any auto-updates applied in the future will revert it back to stock. IF it's being loaded dynamically then it could be because it's trying to render before the page has fully loaded all resources and this is the same problem I've found with the Login button also suffers from. For the next part to work, jQuery must be called on the page before the output of this script in paypal_express.php In includes/modules/payment/paypal_express.php approx line 220 find: $string .= <<<EOD <span id="ppECButton"></span> <script> paypal.Button.render({ env: '{$server}', style: { size: '${button_size}', color: '${button_color}', shape: '${button_shape}' }, payment: function(resolve, reject) { paypal.request.post('${ppecset_url}') .then(function(data) { if ((data.token !== undefined) && (data.token.length > 0)) { resolve(data.token); } else { window.location = '${ppecerror_url}'; } }) .catch(function(err) { reject(err); window.location = '${ppecerror_url}'; }); }, onAuthorize: function(data, actions) { return actions.redirect(); }, onCancel: function(data, actions) { return actions.redirect(); } }, '#ppECButton'); </script> EOD; And replace with: $string .= <<<EOD <span id="ppECButton"></span> <script> $( document ).ready(function() { paypal.Button.render({ env: '{$server}', style: { size: '${button_size}', color: '${button_color}', shape: '${button_shape}' }, payment: function(resolve, reject) { paypal.request.post('${ppecset_url}') .then(function(data) { if ((data.token !== undefined) && (data.token.length > 0)) { resolve(data.token); } else { window.location = '${ppecerror_url}'; } }) .catch(function(err) { reject(err); window.location = '${ppecerror_url}'; }); }, onAuthorize: function(data, actions) { return actions.redirect(); }, onCancel: function(data, actions) { return actions.redirect(); } }, '#ppECButton'); }); </script> EOD; PayPal Login THE CHANGES BELOW ARE ONLY FOR THOSE WHO HAVE SWAPPED OVER TO https://www.paypalobjects.com/js/external/connect/api.js LIKE SMOKY HAS (SEE OTHER POST REGARDING PAYPAL LOGIN UPDATE In includes/modules/content/login/templates/paypal_login.php find: <script type="text/javascript" src="https://www.paypalobjects.com/js/external/connect/api.js"></script> <script type="text/javascript"> paypal.use( ["login"], function(login) { login.render ({ <?php if ( OSCOM_APP_PAYPAL_LOGIN_STATUS == '0' ) { echo ' "authend": "sandbox",'; } if ( OSCOM_APP_PAYPAL_LOGIN_THEME == 'Neutral' ) { echo ' "theme": "neutral",'; } ?> "responseType" : "code id_Token", "locale": "<?php echo $cm_paypal_login->_app->getDef('module_login_language_locale'); ?>", "appid": "<?php echo (OSCOM_APP_PAYPAL_LOGIN_STATUS == '1') ? OSCOM_APP_PAYPAL_LOGIN_LIVE_CLIENT_ID : OSCOM_APP_PAYPAL_LOGIN_SANDBOX_CLIENT_ID; ?>", "scopes": "<?php echo implode(' ', $use_scopes); ?>", "buttonType" : "CWP", "buttonShape" : "rectangle", "buttonSize" : "md", "fullPage" : "false", "containerid": "PayPalLoginButton", "returnurl": "<?php echo str_replace('&amp;', '&', tep_href_link(FILENAME_LOGIN, 'action=paypal_login', 'SSL', false)); ?>" }); }); </script> And replace with: <script type="text/javascript" src="https://www.paypalobjects.com/js/external/connect/api.js"></script> <script type="text/javascript"> $( document ).ready(function() { paypal.use( ["login"], function(login) { login.render ({ <?php if ( OSCOM_APP_PAYPAL_LOGIN_STATUS == '0' ) { echo ' "authend": "sandbox",'; } if ( OSCOM_APP_PAYPAL_LOGIN_THEME == 'Neutral' ) { echo ' "theme": "neutral",'; } ?> "responseType" : "code id_Token", "locale": "<?php echo $cm_paypal_login->_app->getDef('module_login_language_locale'); ?>", "appid": "<?php echo (OSCOM_APP_PAYPAL_LOGIN_STATUS == '1') ? OSCOM_APP_PAYPAL_LOGIN_LIVE_CLIENT_ID : OSCOM_APP_PAYPAL_LOGIN_SANDBOX_CLIENT_ID; ?>", "scopes": "<?php echo implode(' ', $use_scopes); ?>", "buttonType" : "CWP", "buttonShape" : "rectangle", "buttonSize" : "md", "fullPage" : "false", "containerid": "PayPalLoginButton", "returnurl": "<?php echo str_replace('&amp;', '&', tep_href_link(FILENAME_LOGIN, 'action=paypal_login', 'SSL', false)); ?>" }); }); }); </script> Again, any changes made to the above files will be overwritten if the PayPal auto-update button is used at anypoint in the future.
  3. 1 point
    In bm_category.php use: $category_titel = $OSCOM_CategoryTree->getData($current_category_id, 'name'); You just have to add a check if $current_category_id is not empty or zero and use MODULE_BOXES_CATEGORIES_BOX_TITLE for that case.
  4. 1 point
    This will be down to you beeing on a shared server, looks like your host as turned on SSL on the server, just check you config file in admin/includes and make sure all http statments are changes to https. You will need to check this for every link in your code as any that still call http will cause problems of mixed content.
  5. 1 point
    For the code I posted, use $keywords = preg_replace('/[^ \w-\'\"]/', '', $_GET['keywords']);
×