product

Replace the Variable Price range by the chosen variation price in WooCommerce 3

蓝咒 提交于 2019-12-22 17:38:10
问题 On WooCommerce I would like to change the Variable single product page layout. Because, when you have an variable product you get this wired price rage ( below product title ) in the Variable Product page and it shows in the shop page as well. For me the standard way is to show the lowest price of the product in the shop as well as product page and change that price according to user selection of variables. I can't believe why. I can remove the price range and show the lowest price using this

WooCommerce REST Client API - Programmatically get consumer key and secret

我的梦境 提交于 2019-12-22 17:05:28
问题 I am currently using the client-API to implement a simple user front-end to upload products. The function client->products->create() seems to work fine, how ever I can’t get around one issue. Every time I upload a product, the vendor is set to the admin user instead of the user that is currently logged in. Is there a way to set the vendor through the API? Has anybody get done this? This is the function I created that is called by AJaX when the form is submitted (I left key and website fields

Woocommerce Shortcodes Pagination

柔情痞子 提交于 2019-12-22 14:18:04
问题 been trying to figure out how to create a loop to support woocommerce's shortcode WITH Pagination. Because currently, I have a project and would like to have a page with a certain product displayed, for example i have 50 sale products, using this shortcode [sale_products per_page="10"] it just displays 10 products without pagination. Any thoughts regarding this issue? Regards, 回答1: add_action( 'pre_get_posts', 'so_28367762_pre_get_posts' ); function so_28367762_pre_get_posts( $q ) { // We

Woocommerce Shortcodes Pagination

你说的曾经没有我的故事 提交于 2019-12-22 14:17:05
问题 been trying to figure out how to create a loop to support woocommerce's shortcode WITH Pagination. Because currently, I have a project and would like to have a page with a certain product displayed, for example i have 50 sale products, using this shortcode [sale_products per_page="10"] it just displays 10 products without pagination. Any thoughts regarding this issue? Regards, 回答1: add_action( 'pre_get_posts', 'so_28367762_pre_get_posts' ); function so_28367762_pre_get_posts( $q ) { // We

Add a multilingual text after price in woocommerce_get_price_html hook

心已入冬 提交于 2019-12-22 13:54:04
问题 I am building an WooCommerce website and customizing it, copying and pasting code from internet libraries. I have managed to add "custom price and custom text" in woocommerce product so they can be translated into different languages. Here is the look of the product page: https://www.primacent.de/de/product/woo-album-3-2 Here is my code in functions.php : //New Price add_action('woocommerce_product_options_pricing','custom_unit_price'); function custom_unit_price() { woocommerce_wp_text_input

Adding custom text labels to the product prices depending on their type

若如初见. 提交于 2019-12-22 12:06:05
问题 I have one little problem that I can't solve yet. I have this WooCommerce web site with variable products, and currently prices are shown in this way: $5.50 per dozen – $100.00 per dozen I use this CSS rule that adds "per dozen" after every price, but that dont make sense in the current scenario. .price .amount:after { content: " per dozen"; } I would like to show the prices on this variable products this way: $5.50 per dozen – $100.00 per case (quantity number) Thanks in advance for any help

Custom templates in Woocommerce 3

旧时模样 提交于 2019-12-22 10:53:00
问题 I'm trying to make a separate template for only one product with ID 5555. To delete a photo from its page and change the blocks structure. Overriding this file affects all product pages. wp-content\plugins\woocommerce\templates\content-single-product.php The logical solution is to add a condition: if the product single prpduct page have ID 5555, then another template is used for its page. I tried this option, but it does not work. /** * Custom single product template. */ add_filter( 'single

How to enable Software Update in an Eclipse product?

血红的双手。 提交于 2019-12-22 08:30:09
问题 In my Eclipse project, I defined a simple plugin (bundle), a feature that includes the plugin and a product that includes the feature. When I export the poduct (via the "Eclipse Product export wizard" of the product editor), it does build the product. I can launch the product, everything works fine (the plugin is there and doing what it is supposed to do). The only problem is that the user of the product cannot install additional Eclipse features using the Software Update menu (Help ->

Auto add all product attributes when adding a new product in Woocommerce

Deadly 提交于 2019-12-22 08:27:05
问题 A client of mine requested this weird change based on Wordpress' plugin Woocommerce in order to make things "easier".. Is it somehow possible to have all product attributes automatically added when a product is created? Also is it possible to have the "Visible on product page" checkbox automatically disabled if there is no value inputted in the attribute? Any help will be very much appreciated. Edit (explanation): This is what was explained above : 回答1: Here is the way to auto add all

Pass custom calculated product price to cart in Woocommerce

前提是你 提交于 2019-12-22 00:18:00
问题 I have calculated a custom price within the single product page using jquery and have output it as a totalCost variable. How can I use this value and overwrite or pass it through to the checkout to be able to use this new price as the product price? I would post some code but I really dont have a clue where to start. Examples ive seen just set a global price override in the functions file. Many thanks. 回答1: First step: You should need to add a custom hidden field, where you will pass your