Zen Cart Logo
Forums / General Questions / Hide items of info depending on language

Hide items of info depending on language

Locked

Views: 763

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
17 Feb 2009, 5:01 PM
#1
joomoo79 avatar

joomoo79

New Zenner

Join Date:
Feb 2009
Posts:
33
Plugin Contributions:
0

Hide items of info depending on language

I might have a strange question, but I really need to find a solution for it... :frusty:

How can I hide certain items of information depending on the language chosen?

See, my website is in English and French. One example is I would like to hide the product weight in the French version.

I guess I have to alter the php code, but I'm not sure how to do it and especially, where do I access it?

Thank you!!! :D

18 Feb 2009, 10:01 AM
#2
g_nencini avatar

g_nencini

Zen Follower

Join Date:
Mar 2006
Location:
Florence, Italy
Posts:
153
Plugin Contributions:
0

Re: Hide items of info depending on language

In includes\templates\your_template\templates\tpl_product_info_display.php
try this:

if ($_SESSION['language'] == 'english') {................}
else {................}

or simply

if ($_SESSION['language'] == 'english') {................}

Giovanni

21 Feb 2009, 6:08 PM
#3
joomoo79 avatar

joomoo79

New Zenner

Join Date:
Feb 2009
Posts:
33
Plugin Contributions:
0

Re: Hide items of info depending on language

Thank you for your help Giovanni! It actualy seems simpler than what I thought. :smile:
However... I am not sure how to handle my code below... How do I include the if statement to have .product-content invisible during a session in English?

<div class="product-desc">
	<h1><?php echo $products_name; ?></h1>
	<h2><?php echo $marc_product_category; ?></h2>
	<div class="product-content"><?php echo $marc_product_content; ?></div>
	<div class="product-price"><?php echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']); ?></div>
</div>
22 Feb 2009, 4:02 AM
#4
joomoo79 avatar

joomoo79

New Zenner

Join Date:
Feb 2009
Posts:
33
Plugin Contributions:
0

Re: Hide items of info depending on language

Giovanni, thank you so much! :D

I looked around into other php files to see how I could properly use the if statement and managed to make it work perfect! It was actually very simple!

You're the man! :hug: