Page 1 of 1

Eroare produs - Undefined variable: profiles

Posted: Tue Dec 09, 2014 5:12 am
by yo99vld
http://www.boutique-fashion.eu/index.ph ... uct_id=129


as dori sa stiu cum rezolv si eu eroarea aceasta? :( va multumesc

Re: Eroare produs - Undefined variable: profiles

Posted: Tue Dec 09, 2014 1:26 pm
by florinsith
Instalezi tema compatibila cu versiunea ta de opencart , profilele sunt din opencart 1.5.6.x , tema e pentru acea versiune, magazinul tau banuiesc e o versiune mai veche.Sau faci upgrade, sau editezi product.tpl din tema si stergi codul profilelor.

Re: Eroare produs - Undefined variable: profiles

Posted: Wed Dec 10, 2014 4:16 am
by yo99vld
poti sa ma ajuti tu ce sa sterg te rog frumos.

Re: Eroare produs - Undefined variable: profiles

Posted: Thu Dec 11, 2014 4:10 am
by florinsith
Codul:

Code: Select all

 <?php if ($profiles): ?>
      <div class="option">
          <h2><span class="required">*</span><?php echo $text_payment_profile ?></h2>
          <br />
          <select name="profile_id">
              <option value=""><?php echo $text_select; ?></option>
              <?php foreach ($profiles as $profile): ?>
              <option value="<?php echo $profile['profile_id'] ?>"><?php echo $profile['name'] ?></option>
              <?php endforeach; ?>
          </select>
          <br />
          <br />
          <span id="profile-description"></span>
          <br />
          <br />
      </div>
      <?php endif; ?>
si optional:

Code: Select all

$('select[name="profile_id"], input[name="quantity"]').change(function(){
    $.ajax({
		url: 'index.php?route=product/product/getRecurringDescription',
		type: 'post',
		data: $('input[name="product_id"], input[name="quantity"], select[name="profile_id"]'),
		dataType: 'json',
        beforeSend: function() {
            $('#profile-description').html('');
        },
		success: function(json) {
			$('.success, .warning, .attention, information, .error').remove();
            
			if (json['success']) {
                $('#profile-description').html(json['success']);
			}	
		}
	});
});