Sign in to follow this  
Followers 0

PHPurchase and PlatformPro css conflict

10 posts in this topic

Posted · Report post

Can anyone further explain how to fix the settings page issue? I'm running into something very similar. When I go to Platform Pro Settings the Global Options and Template Setup are already expanded and I can't access any of the other sections. I tried renaming the jquery-ui-1.7.1.custom.css file in the PHPurchase plugin folder but didn't notice any effect. Any ideas?

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks Bryan, Unfortunately it doesn't look like they've really resolved the issue. PHPurchase/Cart66 support has been pretty poor in my experience. The funny thing is, PHPurchase and Platform Pro were getting along fine until I upgraded to PHPurchase 2.6.7 from 2.6.5. Is there a way to manually access the different settings panels when the jquery is broken? Thanks for your help. -Zach

Share this post


Link to post
Share on other sites

Posted · Report post

You can edit the plugin code yourself...basically add conditionals to any admin option css or jquery inclusion. It will likely say enqueue script or something like that...you can paste a few block of code if you want help, but please don't paste the whole enchilada

Share this post


Link to post
Share on other sites

Posted · Report post

Here's every instance of "wp_enqueue_script" in the phpurchase.php file. Any hints? ----------------------------------------------------- function PHPurchaseCustomScripts() { $path = WPCURL . '/plugins/phpurchase/js/ajax-setting-form.js'; wp_enqueue_script('ajax-setting-form', $path); // Include jquery-multiselect and jquery-ui wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-sortable'); $path = WPCURL . '/plugins/phpurchase/js/ui.multiselect.js'; wp_enqueue_script('jquery-multiselect', $path, null, null, true); } add_action('admin_init', 'PHPurchaseCustomScripts'); ---------------------------------------------------- /** * Load the jquery library */ function PHPurchaseLoadJquery() { wp_enqueue_script( 'jquery' ); } add_action('wp_print_scripts', 'PHPurchaseLoadJquery'); ------------------------------------------------------ /** * Load the cart from the session or put a new cart in the session */ function PHPurchaseInitCart() { $setting = new PHPurchaseSetting(); $path = WP_PLUGIN_URL . '/phpurchase/js/phpurchase-library.js'; $forceHttps = $setting->lookupValue('auth_force_ssl'); if($forceHttps == 'yes' || $_SERVER['HTTPS'] == 'on' || $_SERVER['SERVER_PORT'] == 443) { $path = str_replace('http:', 'https:', $path); } wp_enqueue_script('phpurchase-library', $path, array('jquery'), '1.0'); session_start(); if(!isset($_SESSION['PHPurchaseCart'])) { $_SESSION['PHPurchaseCart'] = new PHPurchaseCart(); }

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks for the suggestion, Bryan. I'm in the process of evaluating alternatives.

Share this post


Link to post
Share on other sites

Posted · Report post

You'd want to wrap this function: ` function PHPurchaseCustomScripts() { $path = WPCURL . '/plugins/phpurchase/js/ajax-setting-form.js'; wp_enqueue_script('ajax-setting-form', $path); // Include jquery-multiselect and jquery-ui wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-sortable'); $path = WPCURL . '/plugins/phpurchase/js/ui.multiselect.js'; wp_enqueue_script('jquery-multiselect', $path, null, null, true); } ` using an if statement. ` function PHPurchaseCustomScripts() { if (is_page('PHPurchase'): $path = WPCURL . '/plugins/phpurchase/js/ajax-setting-form.js'; wp_enqueue_script('ajax-setting-form', $path); // Include jquery-multiselect and jquery-ui wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-sortable'); $path = WPCURL . '/plugins/phpurchase/js/ui.multiselect.js'; wp_enqueue_script('jquery-multiselect', $path, null, null, true); endif; } ` To know the correct page name for the conditional open up any phpurchase admin page and look in the URL to see what they have it named...

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks Adam! It turns out upgrading to Platform Pro 1.2.3 fixed it. Thanks for the code though, that might come in handy in the future.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0