How to change position of product options? - php

Is there a way to change position of product options? I want to show options below product quantity.
I tried to call wrapper.phtml in app/design/frontend/gallins/default/template/catalog/product/view/addtocart.phtml but couldn't get it to work.
What I have right now is:
- option
- qty
- add to cart button
But I wan't options to be shown below qty.
addtocart.phtml ->
<?php $_product = $this->getProduct(); ?>
<?php $buttonTitle = $this->__('Add to Cart'); ?>
<?php if ($_product->isSaleable()): ?>
<div class="add-to-cart">
<?php if (!$_product->isGrouped()): ?>
<div class="quantity">
<label for="qty"><?php echo $this->__('Qty:') ?></label>
<input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
<div class="clear"></div>
</div>
<?php endif; ?>
<!-- This is where I want to show options -->
<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
<?php echo $this->getChildHtml('', true, true) ?>
</div>
I tried <?php echo $this->getChildHtml('wrapper'), but that didn't work.

you have to make 2 changes in 2 files as if you have product options then
in addtocart.phtml
<?php $_product = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
?>
<?php $buttonTitle = $this->__('Add to Cart'); ?>
<?php if($_product->isSaleable()): ?>
<div class="add-to-cart">
<?php if(!$_product->isGrouped()): ?>
<?php if (count($_attributes) == 0):?>
<label for="qty"><?php echo $this->__('Qty:') ?></label>
<input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
<?php endif; ?>
<?php endif; ?>
<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
<?php echo $this->getChildHtml('', true, true) ?>
</div>
<?php endif; ?>
and Please also change in options\configurable.phtml file change like below
<?php
$_product = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
?>
<?php if ($_product->isSaleable() && count($_attributes)):?>
<label for="qty"><?php echo $this->__('Qty:') ?></label>
<input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
<dl>
<?php foreach($_attributes as $_attribute): ?>
<dt><label class="required"><em>*</em><?php echo $_attribute->getLabel() ?></label></dt>
<dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>
<div class="input-box">
<select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
<option><?php echo $this->__('Choose an Option...') ?></option>
</select>
</div>
</dd>
<?php endforeach; ?>
</dl>
<script type="text/javascript">
var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
</script>
<?php endif;?>
let me know if i can help you more.

Related

switching part of a button option to be a radio

Okay guys so my problem here is I need to show some pictures of colors that people can use to pick the color of a cover. Right now its set up to be a drop down and just select the color but we want to switch it over to be the colors.
Here is the code we have set up right now.
<select name="option[<?php echo $option['product_option_id']; ?>]" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control">
<option value=""><?php echo $text_select; ?></option>
<?php foreach ($option['product_option_value'] as $option_value) { ?>
<option value="<?php echo $option_value['product_option_value_id']; ?>"
<?php if(array_key_exists('poid', $_REQUEST)) { ?>
<?php if($option_value['product_option_value_id']==$_REQUEST['poid']){ echo "selected"; }}?>>
<?php echo $option_value['name']; ?>
<?php if ($option_value['price']) { ?>
(<?php echo $option_value['price_prefix']; ?>
<?php echo $option_value['price']; ?>)
<?php } ?>
</option>
<?php } ?>
</select>
And this is what I've come up with so far.
<?php if ($options) { ?>
<?php foreach ($options as $option) { ?>
<?php foreach ($option['product_option_value'] as $option_value) {
//echo $option_value['image'];
if($option_value['image']){ ?>
<div class="button">
<input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="input-option<?php echo $option['product_option_id']; ?>" />
<img src="<?php echo $option_value['image']?>" />
<label "<?php echo $option_value['name'];?>" </label>
</div>
<?php }}} }?>
Another concern is we have other button options that need to keep working for other selections.
Your <label> syntax is wrong. It should produce:
<label for="button ID">Name</label>
but you're printing:
<label "Name" </label>
Or you can simply wrap a <label> tag around both the button and the name, as I've done below.
<div class="button">
<label>
<input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" />
<img src="<?php echo $option_value['image']?>" />
<?php echo $option_value['name'];?>
</label>
</div>
I got rid of the id on the button because it was creating duplicate IDs on all the buttons in the same radio group, and is probably not needed.
Other than that problem, I think it should work.

Registration page of opencart

I want to edit my register.tpl file of registration process of my opencart page.
I just want to keep the email, password and confirm password fields. When I remove all other fields including first name, last name, address etc and only leave in email, password and confirm password fields, it stops registration. How can I make it continue registration with only 3 fields and also agree to the terms check box I have to keep.
This is the register.tpl file
<div id="content"><?php echo $content_top; ?>
<h1><?php echo $heading_title; ?></h1>
<p><?php echo $text_account_already; ?></p>
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
<h2><?php echo $text_your_details; ?></h2>
<div class="content">
<table class="form">
<tr>
<td><span class="required">*</span> <?php echo $entry_firstname; ?></td>
<td><input class="form-control" type="text" name="firstname" value="<?php echo $firstname; ?>" />
<?php if ($error_firstname) { ?>
<span class="error"><?php echo $error_firstname; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_lastname; ?></td>
<td><input class="form-control" type="text" name="lastname" value="<?php echo $lastname; ?>" />
<?php if ($error_lastname) { ?>
<span class="error"><?php echo $error_lastname; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_email; ?></td>
<td><input class="form-control" type="text" name="email" value="<?php echo $email; ?>" />
<?php if ($error_email) { ?>
<span class="error"><?php echo $error_email; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_telephone; ?></td>
<td><input class="form-control" type="text" name="telephone" value="<?php echo $telephone; ?>" />
<?php if ($error_telephone) { ?>
<span class="error"><?php echo $error_telephone; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><?php echo $entry_fax; ?></td>
<td><input class="form-control" type="text" name="fax" value="<?php echo $fax; ?>" /></td>
</tr>
</table>
</div>
<h2><?php echo $text_your_address; ?></h2>
<div class="content">
<table class="form">
<tr>
<td><?php echo $entry_company; ?></td>
<td><input class="form-control" type="text" name="company" value="<?php echo $company; ?>" /></td>
</tr>
<tr style="display: <?php echo (count($customer_groups) > 1 ? 'table-row' : 'none'); ?>;">
<td><?php echo $entry_customer_group; ?></td>
<td><?php foreach ($customer_groups as $customer_group) { ?>
<?php if ($customer_group['customer_group_id'] == $customer_group_id) { ?>
<input type="radio" name="customer_group_id" value="<?php echo $customer_group['customer_group_id']; ?>" id="customer_group_id<?php echo $customer_group['customer_group_id']; ?>" checked="checked" />
<label for="customer_group_id<?php echo $customer_group['customer_group_id']; ?>"><?php echo $customer_group['name']; ?></label>
<br />
<?php } else { ?>
<input type="radio" name="customer_group_id" value="<?php echo $customer_group['customer_group_id']; ?>" id="customer_group_id<?php echo $customer_group['customer_group_id']; ?>" />
<label for="customer_group_id<?php echo $customer_group['customer_group_id']; ?>"><?php echo $customer_group['name']; ?></label>
<br />
<?php } ?>
<?php } ?></td>
</tr>
<tr id="company-id-display">
<td><span id="company-id-required" class="required">*</span> <?php echo $entry_company_id; ?></td>
<td><input class="form-control" type="text" name="company_id" value="<?php echo $company_id; ?>" />
<?php if ($error_company_id) { ?>
<span class="error"><?php echo $error_company_id; ?></span>
<?php } ?></td>
</tr>
<tr id="tax-id-display">
<td><span id="tax-id-required" class="required">*</span> <?php echo $entry_tax_id; ?></td>
<td><input class="form-control" type="text" name="tax_id" value="<?php echo $tax_id; ?>" />
<?php if ($error_tax_id) { ?>
<span class="error"><?php echo $error_tax_id; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_address_1; ?></td>
<td><input class="form-control" type="text" name="address_1" value="<?php echo $address_1; ?>" />
<?php if ($error_address_1) { ?>
<span class="error"><?php echo $error_address_1; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><?php echo $entry_address_2; ?></td>
<td><input class="form-control" type="text" name="address_2" value="<?php echo $address_2; ?>" /></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_city; ?></td>
<td><input class="form-control" type="text" name="city" value="<?php echo $city; ?>" />
<?php if ($error_city) { ?>
<span class="error"><?php echo $error_city; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span id="postcode-required" class="required">*</span> <?php echo $entry_postcode; ?></td>
<td><input class="form-control" type="text" name="postcode" value="<?php echo $postcode; ?>" />
<?php if ($error_postcode) { ?>
<span class="error"><?php echo $error_postcode; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_country; ?></td>
<td><select class="form-control" name="country_id">
<option value=""><?php echo $text_select; ?></option>
<?php foreach ($countries as $country) { ?>
<?php if ($country['country_id'] == $country_id) { ?>
<option value="<?php echo $country['country_id']; ?>" selected="selected"><?php echo $country['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
<?php } ?>
<?php } ?>
</select>
<?php if ($error_country) { ?>
<span class="error"><?php echo $error_country; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_zone; ?></td>
<td><select class="form-control" name="zone_id">
</select>
<?php if ($error_zone) { ?>
<span class="error"><?php echo $error_zone; ?></span>
<?php } ?></td>
</tr>
</table>
</div>
<h2><?php echo $text_your_password; ?></h2>
<div class="content">
<table class="form">
<tr>
<td><span class="required">*</span> <?php echo $entry_password; ?></td>
<td><input class="form-control" type="password" name="password" value="<?php echo $password; ?>" />
<?php if ($error_password) { ?>
<span class="error"><?php echo $error_password; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_confirm; ?></td>
<td><input class="form-control" type="password" name="confirm" value="<?php echo $confirm; ?>" />
<?php if ($error_confirm) { ?>
<span class="error"><?php echo $error_confirm; ?></span>
<?php } ?></td>
</tr>
</table>
</div>
<h2><?php echo $text_newsletter; ?></h2>
<div class="content">
<table class="form">
<tr>
<td><?php echo $entry_newsletter; ?></td>
<td><?php if ($newsletter) { ?>
<input type="radio" name="newsletter" value="1" checked="checked" />
<?php echo $text_yes; ?>
<input type="radio" name="newsletter" value="0" />
<?php echo $text_no; ?>
<?php } else { ?>
<input type="radio" name="newsletter" value="1" />
<?php echo $text_yes; ?>
<input type="radio" name="newsletter" value="0" checked="checked" />
<?php echo $text_no; ?>
<?php } ?></td>
</tr>
</table>
</div>
<?php if ($text_agree) { ?>
<div class="buttons">
<div class="right"><?php echo $text_agree; ?>
<?php if ($agree) { ?>
<input type="checkbox" name="agree" value="1" checked="checked" />
<?php } else { ?>
<input type="checkbox" name="agree" value="1" />
<?php } ?>
<input type="submit" value="<?php echo $button_continue; ?>" class="button" />
</div>
</div>
<?php } else { ?>
<div class="buttons">
<div class="right">
<input type="submit" value="<?php echo $button_continue; ?>" class="button" />
</div>
</div>
<?php } ?>
</form>
<?php echo $content_bottom; ?></div>
Go to catalog/controller/account/register.php (controller) and into the function validate(). Remove the unnecessary fields. Then remove the fields from your tpl. In this way, you will be able to proceed with only three fields.

Wordpress footer widget settings

Hello this is the link of my website
http://webienz.com/
In footer i want to set 3rd widget as contact info like this
Contact info
Contact Info UK (with flag of UK)
phone
email
address
Contact Info Pakistan (with flag of Pakistan)
phone
email
address
I have purchased theme and i have done some some editing boc.widgets.php but one contact info displaying at a time not both UK and Pakistan here is the original code of contact widget
* Contact Info Widget
class contact_info_widget extends WP_Widget {
function contact_info_widget()
{
$widget_ops = array('classname' => 'contact_info', 'description' => '');
$this->WP_Widget('contact_info-widget', 'Terra: Contact Info', $widget_ops);
}
function widget($args, $instance)
{
extract($args);
$title = apply_filters('widget_title', $instance['title']);
echo $before_widget;
if($title) {
echo $before_title.$title.$after_title;
}
?>
<?php if($instance['phone']): ?>
<div class="icon_phone"><?php echo $instance['phone']; ?></div>
<?php endif; ?>
<?php if($instance['email']): ?>
<div class="icon_mail"><?php echo $instance['email']; ?></div>
<?php endif; ?>
<?php if($instance['address']): ?>
<div class="icon_loc"><?php echo $instance['address']; ?></div>
<?php endif; ?>
<div class="clear h10"></div>
<?php
echo $after_widget;
}
function update($new_instance, $old_instance)
{
$instance = $old_instance;
$instance['title'] = $new_instance['title'];
$instance['address'] = $new_instance['address'];
$instance['phone'] = $new_instance['phone'];
$instance['fax'] = $new_instance['fax'];
$instance['email'] = $new_instance['email'];
$instance['web'] = $new_instance['web'];
return $instance;
}
function form($instance)
{
$defaults = array('title' => 'Contact Info');
$instance = wp_parse_args((array) $instance, $defaults); ?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>">Title:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $instance['title']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('phone'); ?>">Phone:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('phone'); ?>" name="<?php echo $this->get_field_name('phone'); ?>" value="<?php echo $instance['phone']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('email'); ?>">Email:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('email'); ?>" name="<?php echo $this->get_field_name('email'); ?>" value="<?php echo $instance['email']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('address'); ?>">Address:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('address'); ?>" name="<?php echo $this->get_field_name('address'); ?>" value="<?php echo $instance['address']; ?>" />
</p>
<?php
}
}
and this is the code i have edited
/**
* Contact Info Widget
*/
class contact_info_widget extends WP_Widget {
function contact_info_widget()
{
$widget_ops = array('classname' => 'contact_info', 'description' => '');
$this->WP_Widget('contact_info-widget', 'Terra: Contact Info', $widget_ops);
}
function widget($args, $instance)
{
extract($args);
$title = apply_filters('widget_title', $instance['title']);
echo $before_widget;
if($title) {
echo $before_title.$title.$after_title;
}
?>
<?php if($instance['phone']): ?>
<div class="icon_phone"><?php echo $instance['phone']; ?></div>
<?php endif; ?>
<?php if($instance['phone2']): ?>
<div class="icon_phone"><?php echo $instance['phone2']; ?></div>
<?php endif; ?>
<?php if($instance['email']): ?>
<div class="icon_mail"><?php echo $instance['email']; ?></div>
<?php endif; ?>
<?php if($instance['email2']): ?>
<div class="icon_mail"><?php echo $instance['email2']; ?></div>
<?php endif; ?>
<?php if($instance['address']): ?>
<div class="icon_loc"><?php echo $instance['address']; ?></div>
<?php endif; ?>
<?php if($instance['address2']): ?>
<div class="icon_loc"><?php echo $instance['address2']; ?></div>
<?php endif; ?>
<div class="clear h10"></div>
<?php
echo $after_widget;
}
function update($new_instance, $old_instance)
{
$instance = $old_instance;
$instance['title'] = $new_instance['title'];
$instance['address'] = $new_instance['address'];
$instance['address2'] = $new_instance['address2'];
$instance['phone'] = $new_instance['phone'];
$instance['phone2'] = $new_instance['phone2'];
$instance['fax'] = $new_instance['fax'];
$instance['email'] = $new_instance['email'];
$instance['email2'] = $new_instance['email2'];
$instance['web'] = $new_instance['web'];
return $instance;
}
function form($instance)
{
$defaults = array('title' => 'Contact Info');
$instance = wp_parse_args((array) $instance, $defaults); ?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>">Title:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $instance['title']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('phone'); ?>">Phone:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('phone'); ?>" name="<?php echo $this->get_field_name('phone'); ?>" value="<?php echo $instance['phone']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('email'); ?>">Email:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('email'); ?>" name="<?php echo $this->get_field_name('email'); ?>" value="<?php echo $instance['email']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('address'); ?>">Address:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('address'); ?>" name="<?php echo $this->get_field_name('address'); ?>" value="<?php echo $instance['address']; ?>" />
</p>
get_field_id('title'); ?>">Title:
get_field_id('title'); ?>" name="get_field_name('title'); ?>" value="" />
<p>
<label for="<?php echo $this->get_field_id('phone2'); ?>">Phone:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('phone2'); ?>" name="<?php echo $this->get_field_name('phone2'); ?>" value="<?php echo $instance['phone2']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('email2'); ?>">Email:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('email2'); ?>" name="<?php echo $this->get_field_name('email2'); ?>" value="<?php echo $instance['email2']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('address2'); ?>">Address:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('address'); ?>" name="<?php echo $this->get_field_name('address2'); ?>" value="<?php echo $instance['address2']; ?>" />
</p>
<?php
}
}
Please help me out in this code that how i can get desired output in footer i dont have too much know how about php.
Thanks
if you are having trouble with duplicating the fields, then just try a text widget
as a replacement

How customize values on products filter bar wordpress

I need to modify the value and name of the products filter in a Wordpress template that I've purchased.
The template is Automotive - Templatic. I need to change values and name of filter products filter. I'm trying to change this PHP code:
<form id="search_car" name="search_car" action="<?php echo home_url(); ?>" method="get">
<input type="hidden" name="search" id="search" value="vehicle" />
<div class="selectbox select1">
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" placeholder="<?php _e('Model , Name etc...',T_DOMAIN); ?>">
</div>
<span class="shape2"><?php _e('OR',T_DOMAIN); ?></span>
<?php if($post_category): ?>
<div class="selectbox select2">
<select class="select" title="<?php _e("All Makes",T_DOMAIN); ?>" name="makes" id="makes">
<option value=""><?php _e("All Makes",T_DOMAIN); ?></option>
<?php
$args = array( 'taxonomy' => 'vcategory' );
$terms = get_terms( 'vcategory',$args);
foreach ( $terms as $term ):
?>
<option value="<?php echo $term->term_id; ?>" <?php if($_REQUEST['makes'] == $term->term_id){ ?> selected="selected" <?php } ?>><?php echo esc_attr( $term->name ); ?></option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
<?php if($model_status): ?>
<div class="selectbox select2">
<select class="select" title="<?php _e('All Models',T_DOMAIN); ?>" name="status" id="model_status">
<option value=""><?php _e('All Models',T_DOMAIN); ?></option>
<?php
$explode = explode(",",$option);
foreach($explode as $_explode):
?>
<option value="<?php echo $_explode; ?>" <?php if($_REQUEST['status'] == $_explode){ ?> selected="selected" <?php } ?>><?php echo sprintf(__('%s',T_DOMAIN),$_explode); ?></option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
<?php if($fuel): ?>
<div class="selectbox select2">
<select class="select" title="<?php _e('All Type',T_DOMAIN); ?>" name="fuel" id="fuel">
<option value=""><?php _e('All Type',T_DOMAIN); ?></option>
<?php
$fuel_exp = explode(",",$fuel_option);
foreach($fuel_exp as $_fuel_option):
?>
<option value="<?php echo $_fuel_option; ?>" <?php if($_REQUEST['fuel'] == $_fuel_option){ ?> selected="selected" <?php } ?>><?php echo sprintf(__('%s',T_DOMAIN),$_fuel_option); ?></option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
I have to create 3 dropdown fields and 1 text area field. Can you help me?
Thanks in advance...

POST from inside Form

how can I put value of text into the selector inside the form? I need to post text with name=sum into <option value="<?php echo $met->request; ?>"<?php if (isset($method) && $method == $met->request && $currentMethod = $met) { echo ' selected="selected"'; $shownext = true; } ?>><?php echo "$met->description - $met->full_summ $met->valute"; ?></option>
This is my form
<form id="com_telecomax_buydid" action="
<?php echo JRoute::_('index.php',true); ?>" method="post" onsubmit="return telecomax.complete;">
<input type="hidden" name="option" value="com_telecomax" />
<input type="hidden" name="task" value="payment" />
<h3>
<?php if (isset($cart) && $cart) {?>
<p><?php echo JText::_('COM_TELECOMAX_TOTAL_COST_OF_YOUR_CART'); ?>:<span id="com_telecomax_payment_cart_text"><?php echo $cart.' '.JText::_('COM_TELECOMAX_USD'); ?></span></p>
<?php } ?>
<input type="hidden" name="cart" id="com_telecomax_payment_cart" value="<?php echo isset($cart) && $cart ? 1 : ''; ?>" />
<p><label for="com_telecomax_payment_sum"><?php echo JText::_($cart ? 'COM_TELECOMAX_ADDITIONAL_PAY_FOR_TALK' : 'COM_TELECOMAX_DEPOSIT_FUNDS'); ?>:</label>
<input type="text" class="inp-txt" name="sum" id="com_telecomax_payment_sum" value="<?php echo isset($sum) && $sum ? $sum : $default; ?>" /></p>
<p><?php echo JText::_('COM_TELECOMAX_TOTAL_PAYMENT'); ?>:<span id="com_telecomax_payment_total">
<?php echo isset($sum) && $sum ? $sum : $default; ?>
</span> <?php echo JText::_('COM_TELECOMAX_USD'); ?></p>
</h3>
<p><input type="button" id="com_telecomax_payment_getmethod" value="<?php echo JText::_('COM_TELECOMAX_GET_PAYMENT_METHOD'); ?>" />
<p><label for="com_telecomax_payment_method"><?php echo JText::_('COM_TELECOMAX_PAYMENT_METHOD'); ?>:</label></p>
<p><select name="method" id="com_telecomax_payment_method">
<option value=""<?php if (!isset($method) || !$method) echo ' selected="selected"'; ?> disabled="disabled"><?php echo JText::_('COM_TELECOMAX_PLEASE_SELECT_PAYMENT_METHOD'); ?></option>
<?php foreach($this->methods['data'] as $item) { ?>
<optgroup label="<?php echo $item['title']; ?>">
<?php foreach($item['list'] as $met) { ?>
<option value="<?php echo $met->request; ?>"<?php if (isset($method) && $method == $met->request && $currentMethod = $met) { echo ' selected="selected"'; $shownext = true; } ?>><?php echo "$met->description - $met->full_summ $met->valute"; ?></option>
<?php } ?>
</optgroup>
<?php }
?>
</select><input type="hidden" name="paysum" id="com_telecomax_payment_paysum" value="<?php echo isset($currentMethod) ? "$currentMethod->description#$currentMethod->full_summ#$currentMethod->valute" : '##'; ?>" /></p>
<p>
<?php if (isset($cart) && $cart) { ?>
<input type="button" value="<?php echo JText::_('COM_TELECOMAX_BACK'); ?>" onclick="location.href='<?php echo JRoute::_('index.php?option=com_telecomax&task=cart',true); ?>'; return false;" />
<?php } ?>
<input type="submit" value="<?php echo JText::_('COM_TELECOMAX_NEXT'); ?>" id="com_telecomax_payment_next" style="display: <?php echo isset($shownext) ? 'block' : 'none' ; ?>;" />
</p>
</form>

Categories