Questions tagged [price]

Usually an amount of currency paid in exchange for a product or service. An implicit or explicit agreement on the used currency is needed for an unambiguous price specification. Sometimes "the price to pay" is meant metaphorically.
In programming context, the price for a change to a program refers to an increased amount of memory consumption, execution duration, latency, worst case behaviour or any other undesirable attribute of the program afterwards.

Note, when handling currency values in a program it is usually the best method to store prices in integer typed variables, counting the smallest denominations. I.e. storing the integer value 323 (implicit euro cents) in an integer is more reliable than storing the floating point value of 3.23 €.

788 questions
22
votes
1 answer

Change product prices via a hook in WooCommerce 3+

IN WooCommerce, I need to multiply all product prices by a number. So I have used the following (via a plugin): add_filter('woocommerce_get_regular_price', array( $this, 'my_custom_price'), 99); add_filter('woocommerce_get_price', array( $this,…
KronosL
  • 289
  • 2
  • 4
  • 11
14
votes
4 answers

Product Final Price after Many Discount given

I have two tables. One table of Ids and their prices, and second table of discounts per Id. In the table of discounts an Id can has many Discounts, and I need to know the final price of an Id. What is the Best way to query it (in one query) ? The…
erezlale
  • 615
  • 2
  • 5
  • 16
12
votes
1 answer

Display the discounted price and percentage on Woocommerce products

On the image below, it shows the discounted price and percentage I found no custom code searching that has this feature. I am using the code below to display the discounted price, but the price is not formatted (the currency symbol and the decimals…
Duc Phuli
  • 179
  • 1
  • 2
  • 12
12
votes
4 answers

Azure Functions pricing and timeout

I've just noticed recently, that Azure functions acquired a 5 min timeout on the dynamic pricing tier somewhere along the timeline. As I've been busy doing other things, this flew under my radar, until I noticed some long running functions not…
JasonX
  • 461
  • 5
  • 16
11
votes
4 answers

Display Woocommerce product price with and without tax and tax amount

I am using WooCommerce for WordPress and I'm listing items excluding Tax. I need to show separately the Price (without tax), the Tax and the PRICE + Tax on the product page (like in checkout page). I have not been able to find a plugin that does…
Nuri Akman
  • 772
  • 3
  • 15
  • 39
9
votes
1 answer

What is the meaning of the priceRange property in Schema.org?

What does the property priceRange mean in Schema.org? https://schema.org/priceRange I don't understand what is mean that, I live in Kazakhstan, maybe my culture or language does not give clear. Can you give me example for Kazakhstan country, where…
GoldenScrew
  • 171
  • 2
  • 3
  • 13
8
votes
3 answers

Set product sale price programmatically in WooCommerce 3

I have a Woocommerce store set up with various product categories. I want to apply a 20% discount to all products, which belong to the product category Cuckoo For now all I'm trying to achieve is set a sale price in my functions.php It tried as…
Marcus Christiansen
  • 2,203
  • 4
  • 30
  • 67
7
votes
1 answer

Display the product price in a WP_Query loop in Woocommerce

I have this code to display products from a category and I would like to also display it's price. Any ideas what I could add or change? The code below doesn't display anything (no errors either).
aMJay
  • 1,994
  • 5
  • 19
  • 29
6
votes
1 answer

AWS Fargate free tier pricing

I'm trying to understand free tier pricing for AWS Fargate. I understand that AWS ECS is a container orchestrator service. You can choose to have EC2 instances running in it or Fargate. For EC2 the pricing with AWS free tier is clear. Simply said…
Tijl .Reynhout
  • 302
  • 4
  • 16
6
votes
1 answer

Cart item price calculation, based on chosen "days" custom field in Woocommerce

In Woocommerce, I use custom fields to calculate the price of a product, based on this thread code: Display product custom fields as order items in Woocommerce 3. // Add a custom field before single add to…
Dmitry
  • 139
  • 1
  • 4
  • 23
6
votes
2 answers

Replace the Variable Price range by the chosen variation price in WooCommerce 4+

On our woocommerce website I am trying to update the displayed price based on the variations the customer selects from dropdown menus as shown here: I used a php function that had been submitted in another answer by LoictheAztec: Replace the…
Peter Doro
  • 65
  • 1
  • 5
6
votes
1 answer

woocommerce calculate and save price

I have added custom fields to Woocommerce/Add Product/General tab using this excellent tutorial http://www.remicorson.com/mastering-woocommerce-products-custom-fields/ The custom fields (height, width, multiplier) are being saved to the database…
Norv
  • 95
  • 5
6
votes
1 answer

WooCommerce - get_order() doesn't work and it returns zero

I am creating an online shop with WooCommerce and I'm adding a function which will update the bonus point to my database into absract-wc-payment-gateway.php. Here is what I am doing: Firstly, on the checkout page, the users will click the place…
Capslock10
  • 748
  • 1
  • 13
  • 34
5
votes
2 answers

How to use Etsy's updateInventory() call to update Stock/Price for a listing

It is not at all clear to me how to update the price/stock for a listing once it has been created initally using listing->createListing(). To update the stock/price, Etsy's documentation says to call listing->updateInventory(). However, this call…
err1
  • 419
  • 6
  • 16
5
votes
3 answers

What is the priceRange parameter for Google Structured Data Reviews?

I am trying to determine what are the acceptable values for the priceRange parameter. On Google I see "$$$" and that's it. Can someone explain if I should be using $$$ literally or a decimal amount.
somejkuser
  • 8,273
  • 18
  • 51
  • 111
1
2 3
52 53