-1

At my online store, one of my suppliers offers me packs of 100 pieces of a product, however my competition displays the UNIT price of the product (lower than mine, since I have 100 pcs in the product).

I need to display the unit price as well, but when the customer checks out, he needs to pay the actual value of the product.

I thought about some plugin for min / max values, however this opens the possibility for a customer to buy "114" pieces (for example), and I am unable to sell them, as the product comes in packs of 100 pcs.

Is there any easy way to do this? I've read something about custom fields, but before I start fiddling with my online store, I would like to know more from your perspective.

I certainly would like to avoid plugins as much as possible, or if you know about a good plugin that does exactly what I need, let me know.

Thanks

Chris
  • 4,762
  • 3
  • 44
  • 79
Edgar E.
  • 25
  • 2
  • 9
  • Custom field would be a good solution... Add a custom field to each product called unit_price. Then output with `get_post_meta()` https://developer.wordpress.org/reference/functions/get_post_meta/ – Chris Jul 14 '20 at 20:52

1 Answers1

0

My suggestion is to use ACF | Advanced Custom Fields it is free, has alot of features and constantly updated, you also have alot of documentation for the plugin.

You can easly create a text field and input those data into each product that has this problem. See the documentation.

I would create the product with the real price, but place the price per unit before the price to display that is unit based.

<p>Price per unit: <?php the_field('price_per_unit'); ?></p>
Pipo
  • 488
  • 2
  • 10
  • Thanks all for your answers. IF anyone else finds this issue, just: 1) follow @Pipo answer 2) follow this site (https://www.skyverge.com/blog/change-woocommerce-price-display/) 3)Use any code snippets plugin if you want instead of tinkering with your functions.php – Edgar E. Jul 14 '20 at 23:23
  • Accept my answer If it helped to your solution – Pipo Jul 15 '20 at 06:33
  • As of now, the plugin is not free. – user905686 Dec 05 '22 at 11:09