Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="select-price">
- <?php
- $order_id = $_SESSION['orderid'];
- $addonID = get_the_id();
- if($_SESSION['currenttrip']>1){
- $order_item_amount = 0;
- }else{
- $qty = $wpdb->get_row("SELECT order_item_total, order_item_name, order_item_amount FROM fcb_order_item WHERE order_id=$order_id AND order_item_addon_id=$addonID");
- $order_item_amount = ($qty->order_item_amount) ? $qty->order_item_amount : 0;
- }
- if(get_post_meta(get_the_ID(), 'fcb_addon_pricing_type', true) == 'fixed'){
- $max = get_post_meta(get_the_ID(), 'fcb_addon_max_amount', true);
- $options = array_fill(1, $max, 'option');
- echo '<input data-addon-id="'.get_the_id().'" data-price="'.$price.'" type="button" value="-" class="qtyminus new-add-item add-service-item plus left '.$addonID.'" data-type="minus" field="quantity" />';
- echo '<input class="airport-value qty qty-'.get_the_id().'" type="number" name="quantity" value="'.$order_item_amount.'" />';
- echo '<input data-addon-id="'.get_the_id().'" data-price="'.$price.'" type="button" value="+" class="qtyplus new-add-item add-service-item minus right '.$addonID.'" data-type="plus" field="quantity" />';
- } elseif (get_post_meta(get_the_ID(), 'fcb_addon_pricing_type', true) == 'variable') {
- $options = get_post_meta(get_the_ID(), 'fcb_variable', true);
- echo '<input data-addon-id="'.get_the_id().'" data-price="'.$options[0]['price'].'" type="button" value="-" class="qtyminus new-add-item add-service-item plus left '.$addonID.'" data-type="minus" field="quantity" />';
- echo '<input class="airport-value qty qty-'.get_the_id().'" type="number" name="quantity" value="'.$order_item_amount.'" />';
- echo '<input data-addon-id="'.get_the_id().'" data-price="'.$options[0]['price'].'" type="button" value="+" class="qtyplus new-add-item add-service-item minus right '.$addonID.'" data-type="plus" field="quantity" />';
- }
- ?>
- </div>
- foreach ($_GET as $key => $value) { }
Add Comment
Please, Sign In to add comment