mtruitt
Forum Replies Created
-
I ended up getting this to work.
function wc_addl_pricing_fields() { woocommerce_wp_text_input( array( 'label' => 'Cost ($)', 'class' => 'wc_input_price', 'id' => '_cost', 'type' => 'text', 'data_type' => 'price', 'custom_attributes' => array( 'pattern' => '\d{0,5}\.?\d{0,2}' ) ) ); woocommerce_wp_text_input( array( 'label' => 'MSRP ($)', 'class' => 'wc_input_price', 'id' => '_msrp', 'type' => 'text', 'data_type' => 'price', 'custom_attributes' => array( 'pattern' => '\d{0,5}\.?\d{0,2}' ) ) ); } function wc_save_addl_fields( $post_id ) { $wc_cost_field = $_POST['_cost']; if( !empty( $wc_cost_field ) ) { update_post_meta( $post_id, '_cost', esc_attr( $wc_cost_field ) ); } $wc_msrp_field = $_POST['_msrp']; if( !empty( $wc_msrp_field ) ) { update_post_meta( $post_id, '_msrp', esc_attr( $wc_msrp_field ) ); } }name was not getting set on the cost field as it was added as blank. If it is omitted it adds it via the ID.
Forum: Plugins
In reply to: [WooCommerce] CSS changes after updateThat is a huge jump for both (more so for WooCommerce). Basically you will have to go through restyle a lot of it as a lot of it has been refactored since then.
Forum: Plugins
In reply to: [WooCommerce] Woo commerce Shipping change cost according to cityForum: Plugins
In reply to: [WooCommerce] Price variation not workingIf you change your theme to storefront does that issue persist? And Hannah did mean all of it. It allows us to see what plugins, themes, templates etc.
Can you include a screenshot after you have selected a different price?
Forum: Plugins
In reply to: [WooCommerce] Details ButtonI Just tested using a fresh install of WordPress and WooCommerce (both fully updated and no other plugins).
WooCommerce gives you the ability to define what the text will be on the product itself.
By default it was Buy Product.
Forum: Plugins
In reply to: [WooCommerce] Different shipping costs for different TaxesIt sounds like you are trying to use shipping rates to modify tax. Is this correct?
Forum: Plugins
In reply to: [WooCommerce] Menu hidden by part of product pageThat is a responsive issue with the theme on smaller devices (350px and smaller). You would want to reach out to the theme developer as there maybe more issues than just that page.
Forum: Plugins
In reply to: [WooCommerce] Getting 500 Internal Server Error in BitbucketYou would need to look at server logs and reach out to bitbucket.
Forum: Plugins
In reply to: [WooCommerce] Activating Woocommerce crashes my site (white screen)Please refer to https://wordpress.org/support/topic/before-posting-gather-the-following-details/
With the lack of details its hard to even guess what could cause it.
Forum: Plugins
In reply to: [WooCommerce] 0 or Blank priceThe <?php is on there just to make the code highlighting show up correctly. I should have noted that.
If you know any HTML and CSS you could add a span around them and style it based on that. Without knowing how the page looks/is styled it is hard to answer directly on the easiest way to do it.
Forum: Plugins
In reply to: [WooCommerce] What should be in the Woocommerce Products ElementYou will need to reach out to your theme developers.
Forum: Plugins
In reply to: [WooCommerce] woocommerce plus sign brokenWhat do you mean by broken? The function of the plus sign still works as it increases quantity by one when clicked.
If you mean layout. You will need to reach out to the developer/s of the theme you are using. Which looks to be https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
Forum: Plugins
In reply to: [WooCommerce] Coupon code not workUnder limit usage you have it set to X items = 1. This lets it apply to 1 and only 1 item in a cart.
If you want it to apply to the cart period just remove it and save. Then try again.
Forum: Plugins
In reply to: [WooCommerce] Coupon code not workIt looks like it is setup with a restriction based on a single product vs cart.
The second image there is a bit of confusion. Coupons are not generally applied to shipping/tax and would only be based off the subtotal.
The original discount of 250 is based off the first product it was applied to which would be 10% of the 2500 item.
I just tested your cart using that coupon code and it is doing just that as I stated above. Can you check the restrictions and make sure there is nothing there?
Forum: Plugins
In reply to: [WooCommerce] 0 or Blank priceHi @rahimvaziri
This should do what you need. I tested it with 0 and 0.00 entered as values using the most current version of WordPress and WooCommerce and if you leave the price blank.
https://gist.github.com/mtruitt/1fb7bacb4fda7548280d05aaa289e6b1