adelnn7
Forum Replies Created
-
Forum: Plugins
In reply to: [WPCS - WordPress Currency Switcher Professional] showing 0.00thanks
can you please tell me how i can use exchange without changin putting the code in every place that have a price
my price meta “et_budget”
sometimes $product->et_budgetcan i exchange it with one code so it will work everywhere ?
Forum: Plugins
In reply to: [WPCS - WordPress Currency Switcher Professional] showing 0.00the problem above is sloved ,
but i have antoher problem i can’t fix iti have an extra services
it is a checkbox
when you click it the total price will be the service price + the extra service priceand when it update using js
it shows the the first number without converting the currncyi hope you understand me
i need to use ajax in this case ?Forum: Plugins
In reply to: [WPCS - WordPress Currency Switcher Professional] showing 0.00this is the page i want to use it in
the price meta is :et_budget`<?php
global $user_ID;$total = (float) $product->et_budget;
/* Get extra services */
$extras_ids = array();
if (isset($_GET[‘extras_ids’])) {
$extras_ids = $_GET[‘extras_ids’];
}
if (!empty($extras_ids)) {
foreach ($extras_ids as $key => $value) {
$extra = mje_extra_action()->get_extra_of_mjob($value, $product->ID);
if ($extra) {
$total += (float) $extra->et_budget;
} else {
unset($extras_ids[$key]);
}
}
}$total_text = mje_format_price(mje_get_price_after_commission_for_buyer($total));
// Generate order args
$order_args = array();$default_order_args = array(
‘mjob_name’ => $product->post_title,
‘post_title’ => sprintf(__(‘Order for %s ‘, ‘enginethemes’), $product->post_title),
‘post_content’ => sprintf(__(‘Order for %s ‘, ‘enginethemes’), $product->post_title),
‘post_parent’ => $product->ID,
‘et_budget’ => $product->et_budget,
‘total’ => mje_get_price_after_commission_for_buyer($total),
‘extra_ids’ => $extras_ids,
‘post_type’ => ‘mjob_order’,
‘method’ => ‘create’,
‘_wpnonce’ => de_create_nonce(‘ae-mjob_post-sync’),
‘custom_fee’ => mje_get_fee_buy($total),
);// Opening message
if (!empty($product->opening_message)) {
$default_order_args[‘opening_message’] = $product->opening_message;
}// Merge order args with default order args
$order_args = wp_parse_args($order_args, $default_order_args);if ($user_ID != $product->post_author):
?>
<div class=”title-top-pages”>
<p class=”block-title”><?php _e(‘Checkout details’, ‘enginethemes’)?></p>
</div><div class=”row order-information”>
<div class=”col-lg-4 col-md-4 col-sm-12 col-xs-12 items-chosen”>
<div class=”block-items”>
<p class=”title-sub”><?php _e(‘Microjob name’, ‘enginethemes’);?></p>
<div class=”mjob-list”>
<?php mje_get_template(‘template/mjob-item.php’, array(‘current’ => $product));?>
</div>
</div>
</div><div class=”col-lg-8 col-md-8 col-sm-12 col-xs-12 order mjob-order-info”>
<div class=”row inner”>
<div class=”col-lg-12 col-md-12 col-sm-12 col-xs-12″>
<div class=”title-sub”><?php _e(‘Summary description’, ‘enginethemes’);?></div>
<?php echo $product->post_content; ?>
<div class=”row”>
<div class=”col-lg-2 col-md-2 col-sm-2 col-xs-2″>
<p class=”title-sub”>
<?php _e(‘Price’, ‘enginethemes’);?>
</p>
</div>
<div class=”col-lg-10 col-md-10 col-sm-10 col-xs-10 float-right”>
<span class=”price”><?php
echo $product->et_budget;
//echo do_shortcode( ‘[wpcs_price meta_value=et_budget]’ );
?></span>
</div>
</div>
</div>
</div>
<div class=”add-extra”>
<span class=”title-sub”><?php _e(‘Extra’, ‘enginethemes’);?></span>
<div class=”extra-container”>
<?php mje_get_template(‘template/checkout/list-extras.php’, array(‘post’ => $product));?>
</div>
</div>
<div class=”row inner” style = “border-bottom: 1px solid #dfe0e5; margin-bottom: 15px;”>
<div class=”col-lg-12 col-md-12 col-sm-12 col-xs-12″>
<div class=”title-sub”><?php _e(‘Other Fees’, ‘enginethemes’);?></div>
<div class=”row”>
<div class=”col-lg-8 col-md-8 col-sm-8 col-xs-8″>
<p style = “margin-bottom: 20px;”><?php _e(‘Commission fee you must pay for this order.’, ‘enginethemes’);?></p>
</div>
<div class=”col-lg-4 col-md-4 col-sm-4 col-xs-4 float-right”>
<span class=”price fee-buyer”><?php echo mje_format_price(mje_get_fee_buy($total)) ?></span>
</div>
</div>
</div>
</div>
<div class=”float-right action-order”>
<p>
<span class=”total-text”><?php _e(‘Total’, ‘enginethemes’);?></span>
<span class=”total-price mjob-price”><?php echo $total_text; ?></span>
</p>
<button class=”<?php mje_button_classes(array(‘btn-checkout’, ‘mjob-btn-checkout’, ‘waves-effect’, ‘waves-light’));?>”><?php _e(‘Checkout now’, ‘enginethemes’);?></button>
</div>
</div>
</div><?php
//echo ‘<script type=”text/template” id=”mjob_single_data” >’ . json_encode($product) . ‘</script>’;
echo ‘<script type=”text/template” id=”mje-checkout-info”>’ . json_encode($order_args) . ‘</script>’;
echo ‘<script type=”text/template” id=”mje-extra-ids”>’ . json_encode($extras_ids) . ‘</script>’;
?>
<?php else: ?>
<div class=”error-block”>
<p><?php _e(‘You cannot make an order for your own mJob’, ‘enginethemes’);?></p>
<p><?php printf(__(‘Please browsing other mJobs to find the correct one.’, ‘enginethemes’), get_post_type_archive_link(‘mjob_post’));?></p>
</div>
<?php endif;