ericbakuladavis
Forum Replies Created
-
Forum: Plugins
In reply to: Shop, Cart & Checkout pages did not generate?Hi ozonehealth
I don’t have knowledge of or experience with this problem, but I did stumble across a tool that might be relevant:
WP Admin Area > WooCommerce > System Status > Tools > Install WooCommerce Pages
Forum: Plugins
In reply to: [WooCommerce] cart sum two timesAn FTP client is a software program that lets you access the files on a web server via FTP (File Transfer Protocol).
Newer versions of Windows and Mac OS have FTP clients built in. There are also many free third-party FTP clients such as FileZilla. I don’t have a recommendation about which one to use but any of them should work. Once you have an FTP client, you will need to give it your web server’s FTP address and username and password. If you don’t have that info, contact your web host.
Once you have access to the server, be careful not to delete any of the files on your server by accident. Search the folders on the server for one called wp-content and then follow this path: wp-content/themes/[your-theme]/woocommerce/cart/
Inside the cart folder, you should see a file called cart.php. Using the FTP client, copy cart.php onto your computer and make a backup copy of it. Open cart.php with a text editor and delete the line that looks like this:
<?php woocommerce_cart_totals(); ?>
Save the new version of cart.php and, using the FTP client, upload it back to the cart folder. You will probably be asked if you want to replace the existing cart.php file. Choose yes and then check your website to see if the problem is gone.Forum: Plugins
In reply to: [WooCommerce] cart sum two timesHi byb299
The Editor in your Dashboard probably doesn’t show you the template you need to edit. You will probably need to access it by navigating through the folders of your WordPress installation. For this, you may use an FTP client or a file browser provided in your host’s admin area.
Are you familiar with either of these?
Forum: Plugins
In reply to: [Scripts To Footer] jQuery not moving to footer on WooCommerce shop page onlyHi Joshua,
Thanks for checking up. I appreciate that.
I wasn’t able to find the issue, but I am not very good at understanding PHP and I didn’t look very hard.
I ended up using jQuery from Google’s CDN, so I just used the $in_footer parameter when registering it.
Forum: Plugins
In reply to: [WP jQuery Plus] Loading jQuery in noConflict modeThanks, again, for your suggestions, Zach. I am actually loading jQuery in the footer using the $in_footer parameter of wp_enqueue_script. I’m not sure how to get that function to come in right after jQuery. However, as I said before, this isn’t a requirement. So, I’ll let this one rest.
Forum: Plugins
In reply to: [WooCommerce] cart sum two timesmarkmich,
Try looking in wp-content/themes/[your-theme]/woocommerce/cart/cart.php
As I said earlier, these kinds of issues can be avoided if people edit templates in this manner:
1. Make a custom change to an overriding template.
2. Document that change somehow.
3. When a new template version is released, use it as the new overriding template and apply your documented changes to it.This way, you’ll always be using the newest versions of the templates. And you won’t have to deal with issues like this cropping up in the future.
Forum: Plugins
In reply to: [WP jQuery Plus] Loading jQuery in noConflict modeI tried this in functions.php and I didn’t notice a change in the html. Is this line supposed to appear after jQuery? Does it need to be hooked in somewhere?
Forum: Plugins
In reply to: [WP jQuery Plus] Loading jQuery in noConflict modeHi Zach. Thanks for your reply.
Truly, I don’t require noConflict mode. I just thought it would be better to use it because the WordPress bundled version uses it.
That said, I’m not sure what your recommendation meant. Are you saying one could add the code from the other plugin to your plugin?
Forum: Plugins
In reply to: [Scripts To Footer] jQuery not moving to footer on WooCommerce shop page onlyHi Joshua,
Thanks the reply.
The theme I’m using is one I developed from a barebones template theme. Following your post, I emptied the theme’s functions.php file and verified that no theme files contain the string “jquery”. Yet jquery remained in the head on the WooCommerce Shop page. Only turning off WooCommerce allowed it to be moved to the footer.
My next step will be to search the WooCommerce code for an answer. I’ll post back here if I find a solution other than re-registering jquery.
iPhone says
7.1.2 (11D257)
I got some useragent info from Safari as well:
Mozilla/5.0 (iPhone; CPU iPhone OS
7_1_2 like Mac OS X) AppleWebKit/
537.51.2 (KHTML, like Gecko)
Version/7.0 Mobile/11D257 Safari/
9537.53Forum: Plugins
In reply to: [WooCommerce] cart sum two timesAnother way of dealing with updates is to download the current template, make your custom changes to it, and use that in your (child) theme. This process is a lot easier if you’ve documented your custom changes. Using comments in your template overrides is one way to keep track.
You can check which of your template overrides are outdated in Admin Panel > WooCommerce > System Status
Forum: Plugins
In reply to: [WooCommerce] Woocommerce not removing customer info after a purchaseWas your friend using the same admin account when he purchased the test product?
Forum: Plugins
In reply to: [WooCommerce] Custom sort products displayed via shortcode?I figured out how to sort products displayed via shortcode by SKU or Custom Fields.
For SKU, this would go into functions.php:
add_filter('woocommerce_shortcode_products_query', 'add_shortcode_orderby_options', 10, 2); function add_shortcode_orderby_options ($args, $atts) { if ($atts['orderby'] == "sku") { $args['orderby'] = 'meta_value'; $args['meta_key'] = '_sku'; } return $args; return $atts; }
That allows a shortcode like this to be used:
[product_category category="my-category" orderby="sku"]
It also works with other shortcodes that display a list of products like[featured_products]
and
[products]
.I think other meta keys can be used, as well. There is a list of possible meta keys here. They can also be found by scanning files found in plugins/woocommerce/includes/admin/meta-boxes
For Custom Fields, it would be something like this:
add_filter('woocommerce_shortcode_products_query', 'add_shortcode_orderby_options', 10, 2); function add_shortcode_orderby_options ($args, $atts) { if ($atts['orderby'] == "my-custom-sorting-option") { $args['orderby'] = 'meta_value'; $args['meta_key'] = 'my_custom_field_name'; } return $args; return $atts; }
Then your shortcode would be something like:
[product_category category="my-category" orderby="my-custom-sorting-option"]
You’d create a Custom Field by going to Admin Panel > Products > Edit Product. Under Add New Custom Field, click Enter New. The name would be my_custom_field_name and the value would reflect the desired sorting position for that product (i.e. “1”). Click the Add Custom Field button, then Update the product. For your next product, you can choose my_custom_field_name from the dropdown menu, assign it a value (i.e. “2”), and click Add Custom Field then Update.Note: I’m using the same function name in both of these examples. If you want to allow more than one sorting option, use one function and add a separate if statement for each sorting option.
Forum: Plugins
In reply to: [WooCommerce] Category order by SKU shortcode?I’m glad it worked for you!
Thanks for pointing out the issue with:
$args['order'] = $order == 'DESC' ? 'DESC' : 'ASC';
I removed that line and now it works normally: defaults to desc but still allows asc to be defined in the shortcode.
I found a spelling error in my function name… Here’s the updated code:
add_filter('woocommerce_shortcode_products_query', 'add_shortcode_orderby_options', 10, 2); function add_shortcode_orderby_options ($args, $atts) { if ($atts['orderby'] == "sku") { $args['orderby'] = 'meta_value'; $args['meta_key'] = '_sku'; } return $args; return $atts; }
Forum: Plugins
In reply to: [WooCommerce] Category order by SKU shortcode?I confirmed it can be adapted to allow products output by shortcode to be sorted according to Custom Field values defined in the Admin Panel. I suspect it can be adapted to work with existing product meta keys as well (there are many).
It also works with other types of shortcodes such as:
[products ids="1, 2, 3, 4, 5, 6, 7, 8" orderby="whatever"]