Plugin Directory

Changeset 588177


Ignore:
Timestamp:
08/21/2012 05:10:48 AM (14 years ago)
Author:
freerobby
Message:

Tax Rate Added

Added a Tax Rate to the options page
Added "tax" value to the button that gets outputted by the code.

Location:
artpal/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • artpal/trunk/artpal-options.php

    r202503 r588177  
    1414    update_option ( 'ds_ap_unsoldcategory', htmlspecialchars ( $_POST [ 'unsold' ], ENT_QUOTES ) );
    1515    update_option ( 'ds_ap_soldcategory', htmlspecialchars ( $_POST [ 'sold' ], ENT_QUOTES ) );
     16    update_option ( 'ds_ap_taxrate', htmlspecialchars ( $_POST [ 'taxrate' ], ENT_QUOTES ) );
    1617    update_option ( 'ds_ap_paypalemail', htmlspecialchars ( $_POST [ 'paypalemail' ], ENT_QUOTES ) );
    1718    update_option ( 'ds_ap_soldcode', htmlspecialchars ( $_POST [ 'soldcode' ], ENT_QUOTES ) );
     
    238239
    239240<h3>
     241    Sales Tax
     242</h3>
     243<p>
     244    Enter the sales tax rate you would like to apply to the products:
     245    <input type="text" name="taxrate" maxlength="2" size="2" value="<?php echo stripslashes ( get_option ( 'ds_ap_taxrate' ) ) ?>" /> &#37;
     246</p>
     247
     248<h3>
    240249    Store-wide Sale
    241250</h3>
  • artpal/trunk/artpal.php

    r202504 r588177  
    8282    'ds_ap_unsoldcategory',
    8383    'ds_ap_soldcategory',
     84    'ds_ap_taxrate',
    8485    'ds_ap_paypalemail',
    8586    'ds_ap_soldcode',
     
    102103    NULL,
    103104    NULL,
     105    '0.00',
    104106    stripslashes('ValidPaypalEmail@Goes.Here'),
    105107    stripslashes('<b>Sold!</b>'),
     
    281283                                                                            // paintings to make them available again!
    282284        . '<input type="hidden" name="amount" value="' . $price . '">' // price of item
     285        . '<input type="hidden" name="tax" value="' . round(($price * (get_option ( 'ds_ap_taxrate' )/100)),2) . '">' // price of item
    283286        . '<input type="hidden" name="currency_code" value="' . get_option('ds_ap_currencycode4217') . '">' // us dollars only
    284287        . '<input type="hidden" name="quantity" value="1">' // default 1 item
Note: See TracChangeset for help on using the changeset viewer.