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
4
votes
2 answers

Get the product price in Woocommerce 3

I'm trying to get price without currency in a function I made. function add_price_widget() { global $woocommerce; $product = new WC_Product(get_the_ID()); $thePrice = $product->get_price_html(); echo thePrice; } Displays: 100kr How…
Oscar vs
  • 326
  • 2
  • 4
  • 15
4
votes
1 answer

Does Google Cloud Compute Engine pricing depend on processor usage?

I've been using the Google Cloud Compute Engine for the past couple of months, but haven't had to pay for anything yet due their 60-day crediting system. However now that I'm considering actually paying for the service, I'm trying to get a better…
Jonathan Simon
  • 348
  • 4
  • 15
4
votes
1 answer

Get woocommerce product price on php page

I've tried it a long long time to get the price from a specific product on a php file but I cant find a solution. I've tried it with woocommerce shortcodes but I always get the full product in my div and not the price. Does anybody know a solution?…
Johnny97
  • 647
  • 2
  • 9
  • 26
4
votes
2 answers

Screen reader is not reading the price ("$47.49") properly

I am trying to make the screen reader (NVDA) to read my currency value (US dollar) $47.49 as "47 Dollars 49 Cents", but the screen reader is reading my currency value as "Dollar 4749".
Maniram
  • 424
  • 1
  • 13
  • 29
4
votes
2 answers

Magento 2:How get price configurable in product list

How can get price product With simple product: $oldPrice= $_product->getPrice(); $newPrice= $_product->getSpecialPrice(); it returns the right results With configuable product: $oldPrice= $_product->getPrice(); //return Null $newPrice=…
Shadow
  • 103
  • 1
  • 8
4
votes
1 answer

Woocommerce - Can I intercept the Line Price (Cart) calculation?

So for example, I have a product which costs £2/item if you buy singles or £1/item if you buy it in packs of 6. Customers enter their quantity required, let's say 7, and then add it to the basket. The total cost should be £8. £6 (1 pack) + £2 (1…
mevukpaul
  • 67
  • 1
  • 10
3
votes
1 answer

Display on sale cart item formatted prices range in WooCommerce

I try to show the subtotal price and sale price in the Cart and Checkout page for each individual product. I already managed to add the sales price (24TL) to the regular price (33TL) with the following code: /** * Show sale prices on the Cart and…
evavienna
  • 747
  • 6
  • 19
3
votes
2 answers

Does AWS has cross account data transfer cost if both service are in same region?

I want to transfer data from an EC2 machine in one account to an S3 bucket on another account. Here, both the services are in the same region. Is the transfer of data happening over the internet as both are on different accounts?
Neron Joseph
  • 685
  • 7
  • 21
3
votes
3 answers

A regex to get any price string

I need to get the price from a string, but no other numbers. There are no restrictions on what the string can say, but it will always have a dollar amount in it. It's the dollar amount I need to get from the string. The closest solution I've been…
Misha Krul
  • 179
  • 11
3
votes
1 answer

GNUCASH: Can not import stock price from csv to gnucash stock account

I am trying to import some stock trade transactions into GNUCASH stock account. I used a template I export from GNUCASH. Everything loaded correctly except the price. It seems that the system is calculating the shares incorrectly. …
XZXZ
  • 31
  • 2
3
votes
1 answer

Using jquery to show total price in form

What I am trying to do is add the price when user selects an option from a drop down in form.. The from submits data to the database as well so the fields have values assigned as "selfpickup" and "delivery".. What I want is to assign price to the…
Umy Raff
  • 31
  • 2
3
votes
1 answer

wc_price($price) not showing the discount by FILTER "woocommerce_product_get_regular_price"

With WooCommerce, I have the following function that allow me to make a discount on my products prices: add_filter('woocommerce_product_get_regular_price', 'custom_price' , 99, 2 ); function custom_price( $price, $product ) { $price = $price -…
Redman
  • 103
  • 1
  • 1
  • 8
3
votes
1 answer

Hide product price and disable add to cart for specific product categories in Woocommerce

I'm looking for the right code that hides the prices for some specific categories in Woocommerce. I already have the code to hide the prices on de single product page: add_action( 'wp', 'remove_prices_based_on_category' ); function…
JensM
  • 31
  • 1
3
votes
1 answer

Display specific the selected product attribute on the WooCommerce variation price

I am trying to display the selected product attributes on the product single page after the . I found many codes, that are even working, but all of these codes return a list of all available attributes. add_action(…
maariaa
  • 149
  • 1
  • 8
3
votes
1 answer

Add a checkbox on single product pages that adds an additional cost in Woocommerce

In woocommerce, I am using the following code to display an input text field on admin product edit pages, that allow me to add an additonal pricing option to the product: add_action( 'woocommerce_product_options_pricing', 'wc_cost_product_field'…
Francis Alvin Tan
  • 915
  • 1
  • 14
  • 35
1 2
3
52 53