ajax_posts_set_calculate()
ajax_posts_set_calculate()
AJAX callback to calculate the total cost for the post set including shipping costs.
Requires the following paramaters:
- zip string The destination zip code.
- country string The destination country.
- method string The method of payment: 'btc' (BTC) or 'credit' (USD)
JSON Object is printed which includes the following attributes:
- success boolean If the calculation was successful.
- message string The text that should be displayed to the user.
- prices array The list of individual prices for items.
- id integer The ID of the item/post
- total array The total price for the item.
- BTC float In Bitcoins
- USD float In United States Dollars
- printing array The total for printing
- BTC float In Bitcoins
- USD float In United States Dollars
- framing array The total for framing
- BTC float In Bitcoins
- USD float In United States Dollars
- production array The total for production
- BTC float In Bitcoins
- USD float In United States Dollars
- artist array The total for artist fees
- BTC float In Bitcoins
- USD float In United States Dollars
- calculated array The breakdown of how much is spent on each service.
- printing array The price of all printing
- BTC float In Bitcoins
- USD float In United States Dollars
- framing array The price of all framing
- BTC float In Bitcoins
- USD float In United States Dollars
- production array The price of all production
- BTC float In Bitcoins
- USD float In United States Dollars
- artist array The price of all artist fees
- BTC float In Bitcoins
- USD float In United States Dollars
- shipping array The price of all shipping
- BTC float In Bitcoins
- USD float In United States Dollars
- fees array The price of all fees
- BTC float In Bitcoins
- USD float In United States Dollars
- printing array The price of all printing
- method string The method of payment: 'btc' or 'credit'
- total_btc float The grand total for Bitcoins.
- total_usd float The grand total for United States Dollars.