default magento will display the ratings as below image
but i want to change like this :
i am using default magento code
form.phtml [app/design/frontend/rwd/theme/template/review/form.phtml]
<?php if( $this->getRatings() && $this->getRatings()->getSize()): ?>
<h4><?php echo $this->__('Your Rating') ?> <em class="required"></em></h4>
<span id="input-message-box"></span>
<table class="data-table review-summary-table ratings" id="product-review-table">
<col width="1" />
<col />
<col />
<col />
<col />
<col />
<thead>
<tr>
<th> </th>
<th>
<div class="rating-box">
<span class="rating-number">1</span>
<span class="rating nobr" style="width:20%;"><?php echo $this->__('1 star') ?></span>
</div>
</th>
<th>
<div class="rating-box">
<span class="rating-number">2</span>
<span class="rating nobr" style="width:40%;"><?php echo $this->__('2 star') ?></span>
</div>
</th>
<th>
<div class="rating-box">
<span class="rating-number">3</span>
<span class="rating nobr" style="width:60%;"><?php echo $this->__('3 star') ?></span>
</div>
</th>
<th>
<div class="rating-box">
<span class="rating-number">4</span>
<span class="rating nobr" style="width:80%;"><?php echo $this->__('4 star') ?></span>
</div>
</th>
<th>
<div class="rating-box">
<span class="rating-number">5</span>
<span class="rating nobr" style="width:100%;"><?php echo $this->__('5 star') ?></span>
</div>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->getRatings() as $_rating): ?>
<tr>
<th><?php echo $this->escapeHtml($_rating->getRatingCode()) ?></th>
<?php foreach ($_rating->getOptions() as $_option): ?>
<td class="value"><label for="<?php echo $this->escapeHtml($_rating->getRatingCode()) ?>_<?php echo $_option->getValue() ?>"><input type="radio" name="ratings[<?php echo $_rating->getId() ?>]" id="<?php echo $this->escapeHtml($_rating->getRatingCode()) ?>_<?php echo $_option->getValue() ?>" value="<?php echo $_option->getId() ?>" class="radio" /></label></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<input type="hidden" name="validate_rating" class="validate-rating" value="" />
<script type="text/javascript">decorateTable('product-review-table')</script>
<?php endif; ?>
please help me to find solution
Thanks in advance
I recently dealt with it and my code looks something like this:
form.phtml
<?php foreach ($this->getRatings() as $_rating): ?>
<tr>
<th><?php echo $this->escapeHtml($_rating->getRatingCode()) ?>: </th>
<?php foreach ($_rating->getOptions() as $_option): ?>
<td class="value">
<label for="<?php echo $this->escapeHtml($_rating->getRatingCode()) ?>_<?php echo $_option->getValue() ?>">
<input type="radio" name="ratings[<?php echo $_rating->getId() ?>]" id="<?php echo $this->escapeHtml($_rating->getRatingCode()) ?>_<?php echo $_option->getValue() ?>" value="<?php echo $_option->getId() ?>" class="radio" />
<i class="fa fa-star"></i>
</label>
</td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
*.css
.review-summary-table tbody td label input {
display: none;
}
// default
.review-summary-table tbody td label input + .fa {
color: #E6E6E6;
}
// hover, clicked, ...
.review-summary-table tbody td label:hover input + .fa,
.review-summary-table tbody td label input:checked + .fa,
.review-summary-table tbody td.active label input + .fa,
.review-summary-table tbody tr:hover td.tmp-active label input + .fa {
color: #50A4CF;
}
*.js
var reviewTable = $('#product-review-table');
if (reviewTable.length > 0) {
reviewTable.each(function() {
$(this).find('tbody tr').each(function() {
var row = $(this),
tdValues = row.find('td.value');
tdValues.each(function(index) {
$(this).find('label').hover(function() {
tdValues.removeClass('tmp-active');
tdValues.slice(0, index + 1).addClass('tmp-active');
}).click(function() {
tdValues.removeClass('active');
tdValues.slice(0, index + 1).addClass('active');
});
});
});
});
}
Related
After reviewing the product I've just approved and on a single product page it shows comments but the rating star is not showing.
<?php $_votes = $_review->getRatingVotes(); ?>
<?php if (count($_votes)): ?>
<table class="ratings-table">
<col width="1" />
<col />
<tbody>
<?php foreach ($_votes as $_vote): ?>
<tr>
<th><?php echo $this->escapeHtml($_vote->getRatingCode()) ?></th>
<td>
<div class="rating-box">
<div class="rating" style="width:<?php echo $_vote->getPercent() ?>%;"></div>
</div>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
I want to call the "view.phtml" template in the tab "SPECIFICATION" (located in a static block), so that I can show a table of the grouped products.
Within that tab in the block content, I add following commands:
{{block type="catalog/product" template="catalog/product/view.phtml"}}
But nothing happens. I know the view.php located in catalog/product folder. Is there anything wrong with this command?
FYI,
in the "view.phtml", there is only one setence:
<?php echo $this->getChildHtml('product_type_data') ?>
And below is my "grouped.phtml", which is nothing but a table:
<?php $this->setPreconfiguredValue(); ?>
<?php $_product = $this->getProduct(); ?>
<?php $_associatedProducts = $this->getAssociatedProducts(); ?>
<?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
<?php echo $this->getChildHtml('product_type_data_extra') ?>
<div class="grouped-items-table-wrapper" style="border:0px;">
<table class="data-table grouped-items-table" id="super-product-table" style="width:75%;margin-left:10px;">
<tbody>
<tr style="background-color:#091f36;color:white;">
<td class="" colspan="2">
<p>
XCEL Part <br/>
No.
</p>
</td>
<td class="">
<p>
Fence <br/> H'
</p>
</td>
<td class="">
<p>
Fence <br/> W'
</p>
</td>
<td class="">
<p>
Fence<br/> H/mm
</p>
</td>
<td class="">
<p>
Fence <br/>W/mm
</p>
</td>
<td class="">
<p>
Pickets <br/>Qty.
</p>
</td>
<td class="">
<p>
Rails<br/> Qty.
</p>
</td>
<td class="">
<p>
Rings<br/> Qty.
</p>
</td>
<td class="">
<p>
Panel <br/>LB
</p>
</td>
<td class="">
<p>
Panel <br/>KG
</p>
</td>
</tr>
<?php if ($_hasAssociatedProducts): ?>
<?php foreach ($_associatedProducts as $_item): ?>
<?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?>
<tr>
<td class="" colspan="2">
<p>
<?= $_item->getSKU() ?>
</p>
</td>
<td class="">
<p>
<?= $_item->getAttributeText('height') ?>
</p>
</td>
<td class="">
<p>
<?= $_item->getAttributeText('width') ?>
</p>
</td>
<td class="">
<p>
<?= $var=ceil(($_item->getAttributeText('height'))/0.0032808) ?>
</p>
</td>
<td class="">
<p>
<?= $var=ceil(($_item->getAttributeText('width'))/0.0032808) ?>
</p>
</td>
<td class="">
<p>
20
</p>
</td>
<td class="">
<p>
<?= $_item->getAttributeText('rail') ?>
</p>
</td>
<td class="">
<p>
<?= $_item->getAttributeText('ring') ?>
</p>
</td>
<td class="">
<p>
<?= $var=round($_item->getWeight(), 2) ?>
</p>
</td>
<td class="">
<p>
<?= $var=round((($_item->getWeight())/2.2046),2) ?>
</p>
</td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr>
<td colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>"><?php echo $this->__('No options of this product are available.') ?></td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<script type="text/javascript">decorateTable('super-product-table')</script>
{{block type="catalog/product_view" template="catalog/product/view.phtml"}}
As you mention you have defined inside catalog->product->view->view.php
In your block type you have defined "catalog/product_view" so your view.php file should be inside catalog->product->view.php
i have error when i update row to database.
my problem is not update the row and call me when i upload pic with update the file upload not define in index.
my controller :
public function addedit(){
$events = new events_model();
$prodID = $this->input->post('hID');
$text = $this->input->post('ev_text');
$pic = $this->do_upload('ev_pic');
$submit = $this->input->post('submit');
if($submit){
if(!empty($prodID)){
$this->data['events'] = $events->UpdatePost($prodID, $text , $pic );
$this->data['pagetitle'] = "Show Info";
$this->data['success']= "Update Done";
}else{
$this->data['success'] = "Add Done";
}
$this->data['status'] = "1";
}else{
$this->data['status'] = "0";
$this->data['errors'] = "Error";
}
$this->template->build('admin/events/add',$this->data);
}
and model :
function UpdatePost($prodID, $text , $pic ) {
if ($pic == ""){
$vales = array('ev_id' => $prodID , 'ev_text' => $text);
}else{
$vales = array('ev_id' => $prodID , 'ev_text' => $text , 'ev_pic' => $pic);
}
$query = $this->db->update($this->table_name, $vales) or die (mysql_error());
$result = array();
$result["process"] = "ok";
echo "1";
}
and view :
<div class="widget-body">
<table class="data-table" action="./administrator/categories/delete/"><!-- Table Conversion: See Section E in custom.js -->
<thead>
<tr>
<th class="sorting no-background" rowspan="1" colspan="1" style="width: 35px;"><input type="checkbox" id="checkall" /></th>
<th class="sorting" rowspan="1" colspan="1" style="width: 343px;">Tittle</th>
<th class="sorting" rowspan="1" colspan="1" style="width: 100px;">Date</th>
<th class="sorting no-background" rowspan="1" colspan="1" style="width: 70px;">#</th>
</tr>
</thead>
<tbody>
<?php $ctr = 0; ?>
<?php foreach ($events as $n): ?>
<tr>
<td><input class="checkrow" type="checkbox" value="<?php echo $n->ev_id; ?>" /></td>
<td class=" sorting_1"><?= $n->ev_text; ?></td>
<td class="center"><?= $n->ev_date; ?></td>
<td>
<span>Edit</span>
<span>Del</span>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<div id="table-extra">
<div id="table-action">
<input action="./administrator/<?php echo $this->uri->segment(2)."/deleteitems" ?>" class="btn-theme table-button btn-hover-black DeleteItems" id="submit" type="button" value="Delete" />
</div>
<div class="paginate">
<ul>
<?= $this->pagination->create_links(); ?>
</ul>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
</div>
</div>
where problem in my code , and i wont to update success.
you don't load models like this $events = new events_model(); in CI, you should do it like this :
$this->load->model('Model_name');
$this->Model_name->function();
ref : http://ellislab.com/codeigniter/user-guide/general/models.html#loading
I'm using opencart 1.5.1 with the theme crista_blue which according to their website is compatible with opencart 1.5.1.
A very similar question was asked here: -SOLVED- Opencart can't load Region / State dropdown but the answer there says "In the controller catalog/controller/account/register.php there is no such an action called zone - therefore the server returns a 404 response and no zones are loaded."
My enroll.php file does have a zone action in it. Which makes me think the problem is of a different nature.
Two other people built this site and are no longer around to maintain it. It seems at first they used the default register.tpl/register.php for the account creation but then decided to change the welcome page where the "register" link takes you to enroll.php/enroll.tpl.
This is the website https://www.mybaysix.com/. If you click the Register link at the bottom you are brought to a form where the Region / State dropdown appears but is empty. If you hit continue the page displays the error messages for the required fields, and the Region / State dropdown box is now loaded with options.
Here is the enroll.tpl file:
<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
<div class="breadcrumb">
<?php foreach ($breadcrumbs as $breadcrumb) { ?>
<?php echo $breadcrumb['separator']; ?><?php echo $breadcrumb['text']; ?>
<?php } ?>
</div>
<h1><?php echo $heading_title; ?></h1>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?>
<p><?php echo $text_buyer_information; ?></p>
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="register">
<!-- Company info -->
<h2><?php echo $text_your_address; ?> </h2>
<div class="content">
<table class="form">
<tr>
<td><span class="required">*</span> <?php echo $entry_company; ?></td>
<td><input type="text" name="company" value="<?php echo $company; ?>" />
<?php if ($error_company) { ?>
<span class="error"><?php echo $error_company; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_federal_tax; ?></td>
<td><input type="text" name="federal_tax" value="<?php echo $federal_tax; ?>" />
<?php if ($error_federal_tax) { ?>
<span class="error"><?php echo $error_federal_tax; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_dba; ?></td>
<td><input type="text" name="dba" value="<?php echo $dba; ?>" />
<?php if ($error_dba) { ?>
<span class="error"><?php echo $error_dba; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_state_resale; ?></td>
<td><input type="text" name="state_resale" value="<?php echo $state_resale; ?>" />
<?php if ($error_state_resale) { ?>
<span class="error"><?php echo $error_state_resale; ?></span>
<?php } ?></td>
</tr>
<tr>
<td> <?php echo $entry_store_website; ?></td>
<td><input type="text" name="store_website" value="<?php echo $store_website; ?>" /></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_address_1; ?></td>
<td><input 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 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 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 class="required">*</span> <?php echo $entry_postcode; ?></td>
<td><input 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 name="country_id" onchange="$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=' + this.value + '&zone_id=<?php echo $zone_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 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 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 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_buyer_information; ?></h2>
<div class="content">
<table class="form">
<tr>
<td><span class="required">*</span> <?php echo $entry_firstname; ?></td>
<td><input 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 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 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 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 type="text" name="fax" value="<?php echo $fax; ?>" /></td>
</tr>
</table>
</div>
<h2><?php echo $text_owner_information; ?></h2>
<div class="content">
<table class="form">
<tr>
<td><?php echo $entry_owner_fname; ?></td>
<td><input type="text" name="owner_fname" value="<?php echo $owner_fname; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_owner_lname; ?></td>
<td><input type="text" name="owner_lname" value="<?php echo $owner_lname; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_owner_phone; ?></td>
<td><input type="text" name="owner_phone" value="<?php echo $owner_phone; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_owner_fax; ?></td>
<td><input type="text" name="owner_fax" value="<?php echo $owner_fax; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_owner_email; ?></td>
<td><input type="text" name="owner_email" value="<?php echo $owner_email; ?>" /></td>
</tr>
</table>
</div>
<h2><?php echo $text_manager_information; ?></h2>
<div class="content">
<table class="form">
<tr>
<td><?php echo $entry_manager_fname; ?></td>
<td><input type="text" name="manager_fname" value="<?php echo $manager_fname; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_manager_lname; ?></td>
<td><input type="text" name="manager_lname" value="<?php echo $manager_lname; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_manager_phone; ?></td>
<td><input type="text" name="manager_phone" value="<?php echo $manager_phone; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_manager_fax; ?></td>
<td><input type="text" name="manager_fax" value="<?php echo $manager_fax; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_manager_email; ?></td>
<td><input type="text" name="manager_email" value="<?php echo $manager_email; ?>" /></td>
</tr>
</table>
</div>
<h2><?php echo $text_other_information; ?></h2>
<div class="content">
<table class="form">
<tr>
<td><?php echo $entry_other_fname; ?></td>
<td><input type="text" name="other_fname" value="<?php echo $other_fname; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_other_lname; ?></td>
<td><input type="text" name="other_lname" value="<?php echo $other_lname; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_other_phone; ?></td>
<td><input type="text" name="other_phone" value="<?php echo $other_phone; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_other_fax; ?></td>
<td><input type="text" name="other_fax" value="<?php echo $other_fax; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_other_email; ?></td>
<td><input type="text" name="other_email" value="<?php echo $other_email; ?>" /></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 == 1) { ?>
<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 } ?>
<a onclick="$('#register').submit();" class="button"><span><?php echo $button_continue; ?></span></a></div>
</div>
<?php } else { ?>
<div class="buttons">
<div class="right"><a onclick="$('#register').submit();" class="button"><span><?php echo $button_continue; ?></span></a></div>
</div>
<?php } ?>
</form>
<?php echo $content_bottom; ?></div>
<script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
//--></script>
<script type="text/javascript"><!--
$('.fancybox').fancybox({
width: 560,
height: 560,
autoDimensions: false
});
//--></script>
<?php echo $footer; ?>
This is the zone function at the bottom of enroll.php:
public function zone() {
$output = '<option value="">' . $this->language->get('text_select') . '</option>';
$this->load->model('localisation/zone');
$results = $this->model_localisation_zone->getZonesByCountryId($this->request->get['country_id']);
foreach ($results as $result) {
$output .= '<option value="' . $result['zone_id'] . '"';
if (isset($this->request->get['zone_id']) && ($this->request->get['zone_id'] == $result['zone_id'])) {
$output .= ' selected="selected"';
}
$output .= '>' . $result['name'] . '</option>';
}
if (!$results) {
$output .= '<option value="0">' . $this->language->get('text_none') . '</option>';
}
$this->response->setOutput($output);
}
I've never used opencart before so if there is any more information that would help figure out the problem just ask.
EDIT: I attempted shadyyx's first answer below and this was the result.
I changed the .load to ('index.php?route=account/enroll/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
I also tried with the full path /catalog/controller/account/enroll/. The dropdown still didn't populate. When I hit continue with nothing filled out an error appears at the top Notice: Undefined index: zone_id in /home/mybaysix/public_html/catalog/controller/account/enroll.php on line 551
Line 551 of enroll.php is if ($this->request->post['zone_id'] == '') { $this->error['zone'] = $this->language->get('error_zone'); }
First, welcome to Stack OverFlow!
Your enroll.php maybe does have the zone() function, but in Your HTML's JavaScript, You are calling:
<script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
//--></script>
Thus You are trying to load /catalog/controller/account/register.php::zone()...
Instead You should be calling:
<script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=<DIRECTORY>/enroll/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
//--></script>
Switch the <DIRECTORY> value with the correct one...
EDIT:
use only account/enroll/zone, not the full path
change the condition on that line 551 from
if ($this->request->post['zone_id'] == '')
to
if ($this->request->get['zone_id'] == '') (mind switching from post -> get).
EDIT 2:
I guess the dev team messed many things up when reimplementing the registration form... The $('#register').submit(); is OK as Your <form ...> has id="register". Try again this change: from
if ($this->request->get['zone_id'] == '')
to
if (isset($this->request->get['zone_id'] == ''))
Now the Notice: Undefined index: zone_id error shouldn't occur.
I'm using attribute filter option in my store. For this i'm using below codes in admin view template. This'll fetch all attributes form database and using jquery tabs i'm hiding all inactive ones.
The weired problem what i'm facing is LOADING TIME . I'm having more than 5k products in my store. SO retrieving all attributes taking long time(I think so). Did anyone have any idea to reduce loading time in this case?
<div id="tab-subcategory-<?php echo $category['category_id']; ?>" class="htabs-content">
<input name="VALORES_<?php echo $category['category_id']; ?>" type="checkbox" value="1" onclick="Selecbox(this);"/><?php echo $entry_all_values; ?>
<input name="VALORES_<?php echo $category['category_id']; ?>" type="hidden" value="<?php echo $category['category_id']; ?>" />
<table width="100%" border="0" cellpadding="2" class="list">
<thead>
<tr>
<td class="left"><?php echo $entry_value; ?><img src="view/image/information.png" width="15" height="15" hspace="10" border="0" align="absmiddle" class="tooltip" title="<?php echo $entry_values_explanation; ?>" /></td>
<td class="left"><?php echo $entry_separator; ?> <img src="view/image/information.png" width="15" height="15" hspace="10" border="0" align="absmiddle" class="tooltip" title="<?php echo $entry_separator_explanation; ?>" /></td>
<td class="left"><?php echo $entry_examples; ?></td>
</tr>
</thead>
<tbody>
<?php foreach ($category['attributes'] as $attribute) { ?>
<tr>
<td class="left">
<?php if ($attribute['checked']) { ?>
<input name="VALORES_<?php echo $category['category_id']; ?>[attributes][<?php echo $attribute['attribute_id']; ?>][attribute_id]" type="checkbox" value="<?php echo $attribute['attribute_id']; ?>" checked="checked" /><?php echo $attribute['name']; ?>
<?php }else{ ?>
<input name="VALORES_<?php echo $category['category_id']; ?>[attributes][<?php echo $attribute['attribute_id']; ?>][attribute_id]" type="checkbox" value="<?php echo $attribute['attribute_id']; ?>" /><?php echo $attribute['name']; ?>
<?php } ?>
</td>
<td class="left"><input name="VALORES_<?php echo $category['category_id']; ?>[attributes][<?php echo $attribute['attribute_id']; ?>][separator]" type="text" value="<?php echo $attribute['separator']; ?>" size="5"/></td>
<td class="left">
<?php foreach ($languages as $language) { ?>
<select name="select" id="select<?php echo $language; ?>" style="width: 150px" >
<?php
if ($attribute['attribute_values'][$language['language_id']]){
natsort($attribute['attribute_values'][$language['language_id']]);
foreach ($attribute['attribute_values'][$language['language_id']] as $valores_default){ ?>
<option><?php echo trim($valores_default); ?></option>
<?php } ?>
<?php }else{ ?>
<option> <?php echo $text_none; ?></option>
<?php } ?>
</select><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /><br />
<?php } ?>
</td>
</tr>
<?php
} ?>
</tbody>
</table>
</div>
<?php foreach ($category['children'] as $child) { ?>
<div id="tab-subcategory-<?php echo $category['category_id']; ?>-<?php echo $child['category_id']; ?>" class="htabs-content">
<input name="VALORES_<?php echo $child['category_id']; ?>" type="checkbox" value="1" onclick="Selecbox(this);"/>
<?php echo $entry_all_values; ?>
<input name="VALORES_<?php echo $child['category_id']; ?>" type="hidden" value="<?php echo $child['category_id']; ?>" />
<table width="100%" border="0" cellpadding="2" class="list">
<thead>
<tr>
<td class="left"><?php echo $entry_value; ?><img src="view/image/information.png" width="15" height="15" hspace="10" border="0" align="absmiddle" class="tooltip" title="<?php echo $entry_values_explanation; ?>" /></td>
<td class="left"><?php echo $entry_separator; ?><img src="view/image/information.png" width="15" height="15" hspace="10" border="0" align="absmiddle" class="tooltip" title="<?php echo $entry_separator_explanation; ?>" /></td>
<td class="left"><?php echo $entry_examples; ?></td>
</tr>
</thead>
<tbody>
<?php foreach ($child['attributes'] as $attribute) { ?>
<tr>
<td class="left">
<?php if ($attribute['checked']) { ?>
<input name="VALORES_<?php echo $child['category_id']; ?>[attributes][<?php echo $attribute['attribute_id']; ?>][attribute_id]" type="checkbox" value="<?php echo $attribute['attribute_id']; ?>" checked="checked" /><?php echo $attribute['name']; ?>
<?php }else{ ?>
<input name="VALORES_<?php echo $child['category_id']; ?>[attributes][<?php echo $attribute['attribute_id']; ?>][attribute_id]" type="checkbox" value="<?php echo $attribute['attribute_id']; ?>" /><?php echo $attribute['name']; ?>
<?php } ?>
</td>
<td class="left"><input name="VALORES_<?php echo $child['category_id']; ?>[attributes][<?php echo $attribute['attribute_id']; ?>][separator]" type="text" value="<?php echo $attribute['separator']; ?>" size="5"/></td>
<td class="left">
<?php foreach ($languages as $language) { ?>
<select name="select" id="select<?php echo $language; ?>" style="width: 150px" >
<?php
if ($attribute['attribute_values'][$language['language_id']]){
natsort($attribute['attribute_values'][$language['language_id']]);
foreach ($attribute['attribute_values'][$language['language_id']] as $valores_default){ ?>
<option><?php echo trim($valores_default); ?></option>
<?php } ?>
<?php }else{ ?>
<option> <?php echo $text_none; ?></option>
<?php } ?>
</select><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /><br />
<?php } ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<?php foreach ($child['sisters_id'] as $sister) { ?>
<div id="tab-subcategory-<?php echo $category['category_id']; ?>-<?php echo $child['category_id']; ?>-<?php echo $sister['category_id']; ?>" class="htabs-content">
<input name="VALORES_<?php echo $sister['category_id']; ?>" type="checkbox" value="1" onclick="Selecbox(this);"/>
<?php echo $entry_all_values; ?>
<input name="VALORES_<?php echo $sister['category_id']; ?>" type="hidden" value="<?php echo $sister['category_id']; ?>" />
<table width="100%" border="0" cellpadding="2" class="list">
<thead>
<tr>
<td class="left"><?php echo $entry_value; ?><img src="view/image/information.png" width="15" height="15" hspace="10" border="0" align="absmiddle" class="tooltip" title="<?php echo $entry_values_explanation; ?>" /></td>
<td class="left"><?php echo $entry_separator; ?><img src="view/image/information.png" width="15" height="15" hspace="10" border="0" align="absmiddle" class="tooltip" title="<?php echo $entry_separator_explanation; ?>" /></td>
<td class="left"><?php echo $entry_examples; ?></td>
</tr>
</thead>
<tbody>
<?php foreach ($sister['attributes'] as $attribute) { ?>
<tr>
<td class="left">
<?php if ($attribute['checked']) { ?>
<input name="VALORES_<?php echo $sister['category_id']; ?>[attributes][<?php echo $attribute['attribute_id']; ?>][attribute_id]" type="checkbox" value="<?php echo $attribute['attribute_id']; ?>" checked="checked" /><?php echo $attribute['name']; ?>
<?php }else{ ?>
<input name="VALORES_<?php echo $sister['category_id']; ?>[attributes][<?php echo $attribute['attribute_id']; ?>][attribute_id]" type="checkbox" value="<?php echo $attribute['attribute_id']; ?>" /><?php echo $attribute['name']; ?>
<?php } ?>
</td>
<td class="left"><input name="VALORES_<?php echo $sister['category_id']; ?>[attributes][<?php echo $attribute['attribute_id']; ?>][separator]" type="text" value="<?php echo $attribute['separator']; ?>" size="5"/></td>
<td class="left">
<?php foreach ($languages as $language) { ?>
<select name="select" id="select<?php echo $language; ?>" style="width: 150px" >
<?php
if ($attribute['attribute_values'][$language['language_id']]){
natsort($attribute['attribute_values'][$language['language_id']]);
foreach ($attribute['attribute_values'][$language['language_id']] as $valores_default){ ?>
<option><?php echo trim($valores_default); ?></option>
<?php } ?>
<?php }else{ ?>
<option> <?php echo $text_none; ?></option>
<?php } ?>
</select><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /><br />
<?php } ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<?php } ?>
<?php } ?>