Post by vojtech25 » Mon Feb 08, 2010 5:45 pm

Hello everybody,

I've got a problem.. I added one line to the product detail into the catalog/view/theme/default/template/product/product.tpl... Watch here:

Code: Select all

<tr>
   <td><b><?php echo $text_price_without_tax; ?></b></td>
   <td><?php echo $priceWithoutText; ?></td>
          </tr>
and I also added the variable into the catalog/language/english/product/product.php :

Code: Select all

$_['text_price']         = 'Price (with VAT):';
$_['text_price_without_tax']         = 'Price (without VAT):';
However, if I go to my Eshop, to the product detail, it is written there : Unknown variable $text_price_without_text in .../product/product.tpl


Does someone know, where could be a mistake..? Did I forgot anything to change..??

Thank you very much...

______________________________________________________
http://www.vojtechzahorsky.com


New member

Posts

Joined
Tue Jan 19, 2010 7:18 pm

Post by dbstr » Mon Feb 08, 2010 5:51 pm

go to catalog/controller/product/product.php and add

Code: Select all

$this->data['text_price_without_tax'] = $this->language->get('text_price_without_tax');
at around line 123

alternatively, replace

Code: Select all

<td><b><?php echo $text_price_without_tax; ?></b></td>
with

Code: Select all

<td><b><?php echo $this->language->get('text_price_without_tax'); ?></b></td>

Request Reviews v1.0 released.


Active Member

Posts

Joined
Sun Aug 30, 2009 12:20 am

Post by vojtech25 » Mon Feb 08, 2010 6:07 pm

Oooh ok,
thank you very very much...

And now it is writing(it wrote even last, but i didnt want to write here too much) Undefined variable: priceWithoutTax in catalog/view/theme/default/template/product/product.tpl ...

Howevere, I added this to the catalog/controller/product/product.php..

Code: Select all

if ($discount) {
$price = $this->currency->format($this->tax->calculate($discount, $this->config->get('config_tax')));

$priceWithoutTax =  $this->currency->format($this->tax->calculate($discount, $result['tax_class_id'], $this->config->get('config_tax')));
So it should now variable $priceWithoutTax ... But it does not.. There will be the similar problem like last, or not..?

______________________________________________________
http://www.vojtechzahorsky.com


New member

Posts

Joined
Tue Jan 19, 2010 7:18 pm

Post by dbstr » Mon Feb 08, 2010 7:08 pm

I assume that's for the related products?

Replace

Code: Select all

$this->data['products'][] = array(
            		'name'    => $result['name'],
					'model'   => $result['model'],
            		'rating'  => $rating,
					'stars'   => sprintf($this->language->get('text_stars'), $rating),
					'thumb'   => image_resize($image, $this->config->get('config_image_related_width'), $this->config->get('config_image_related_height')),
            		'price'   => $price,
					'special' => $special,
					'href'    => $this->model_tool_seo_url->rewrite($this->url->http('product/product&product_id=' . $result['product_id']))
          		);
with

Code: Select all

$this->data['products'][] = array(
            		'name'    => $result['name'],
					'model'   => $result['model'],
            		'rating'  => $rating,
					'stars'   => sprintf($this->language->get('text_stars'), $rating),
					'thumb'   => image_resize($image, $this->config->get('config_image_related_width'), $this->config->get('config_image_related_height')),
            		'price'   => $price,
                    'priceWithoutTax' => $priceWithoutTax,
					'special' => $special,
					'href'    => $this->model_tool_seo_url->rewrite($this->url->http('product/product&product_id=' . $result['product_id']))
          		);

Request Reviews v1.0 released.


Active Member

Posts

Joined
Sun Aug 30, 2009 12:20 am

Post by vojtech25 » Mon Feb 08, 2010 9:15 pm

OK,

thank you!!

______________________________________________________
http://www.vojtechzahorsky.com


New member

Posts

Joined
Tue Jan 19, 2010 7:18 pm

Post by electron » Fri Feb 19, 2010 11:25 pm

Thanks for that as well, it worked for me when adding a new text_sku variable ;)

Newbie

Posts

Joined
Wed Feb 17, 2010 10:01 pm

Post by inaean » Sun Apr 25, 2010 5:13 am

How exactly did you add the sku? It doesn't work for me.

Newbie

Posts

Joined
Sat Apr 17, 2010 12:18 am
Who is online

Users browsing this forum: No registered users and 40 guests