Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / There's no product description and i dont know to get it back

There's no product description and i dont know to get it back

Locked

Started by thebuz on 28 Apr 2009, 4:53 PM · Views: 1,196

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
28 Apr 2009, 4:53 PM
#1
thebuz avatar

thebuz

Zen Follower

Join Date:
Apr 2009
Posts:
84
Plugin Contributions:
0

Post #1 by thebuz

hi guys the product description has gone and i dont know how to get it back i know the issue is not with these files as i have tried the default files with these and the issue is still there

tpl_document_product_info_display.php
tpl_product_info_display.php
english.php

please could you suggest any files i may have altered that would cause this problem. i really need your help the site is due to go live on thursday and i still have so much to do any help would be fantastic thank you :smile:

Edit: the site is http://www.testvip.myfreeola.com/ to get to a product with a description use this process create computer -> AMD -> Home pc. the page will take a few seconds to load. thanks again

28 Apr 2009, 5:00 PM
#2
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Post #2 by bunyip

Have you tried switching back to the default template from Admin and checking if the problem is still there? It will help narrow down the cause...

Neville
An assumption is what you arrive at when you get tired of thinking...

28 Apr 2009, 5:05 PM
#3
thebuz avatar

thebuz

Zen Follower

Join Date:
Apr 2009
Posts:
84
Plugin Contributions:
0

Post #3 by thebuz

hi bunyip,

just tried that and the products wont even load under the old template :(

28 Apr 2009, 5:09 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #4 by kobra

please could you suggest any files i may have altered that would cause this problem.
Maybe a list of these files would help as we can not guess what files you have altered

And a link to the issue is most always an aid

Zen-Venom Get Bitten

28 Apr 2009, 5:11 PM
#5
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Post #5 by bunyip

I just looked at your page source code - the product description is included in the page source but you have a problem in there with your javascript.

Here's an extract from the page source:

If you are uncertain about a particular component, the default choice selected is suitable in most circumstances. <br /><br />If you are really unsure please contact us by</span><script type="text/javascript">[B]/ Popup window code[/B]
function newPopup(url) {
	popupWindow = window.open(
		url,'popUpWindow',

the section highlighted in red is not commented out correctly.

Firefox is also showing errors at two places in javascript:

	var centre = document.getElementById('productGeneral');
``` this is returning null - there is no element with an ID of 'productGeneral' -although that is one of the classes of the div with ID productDescription. Try changing that line of the javascript to be 
var centre = document.getElementById('productDescription');
the other javascript error that Firefox is showing is in script_ajax_image_swapper.js at line 99 - $("products_id") is null

Neville
An assumption is what you arrive at when you get tired of thinking...

28 Apr 2009, 5:50 PM
#6
thebuz avatar

thebuz

Zen Follower

Join Date:
Apr 2009
Posts:
84
Plugin Contributions:
0

Post #6 by thebuz

thank you bunyip i'm a little closer now.

i think it's the script_ajax_image_swapper.js because when i remove it the product description shows up again

the code is ```
var xHRObject = false;
if (window.ActiveXObject) {
xHRObject = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest){
xHRObject = new XMLHttpRequest();
}

var indicator_url = 'images/web_images/indicator.gif';

function getData() {
if (xHRObject.readyState == 4 && xHRObject.status == 200) {
var serverResponse = xHRObject.responseXML;
if (serverResponse != null) {
var itemsNode = serverResponse.getElementsByTagName('items');
if (itemsNode.length > 0) {
var attribute = itemsNode[0].attributes[0].value;
if (attribute == 'loadImages') {
$('image_nav_container').empty();

				var item_node = serverResponse.getElementsByTagName('item');
				var total_image = item_node.length;
				var images_array = new Array();
				var num_image_displayed = $('ais_image_num').getProperty('value');
				for (i=0; i< total_image; i++) {
					var image_array = get_image_array(item_node[i]);
					images_array[i] = image_array;
				}
				
				var image_viewer = new ImageViewer('image_medium_container', 'image_nav_container', images_array, num_image_displayed, {
					small_container_width : $('ais_small_container_width').getProperty('value'),
					small_container_height : $('ais_small_container_height').getProperty('value'),
					scroll_size : $('ais_scroll_size').getProperty('value')
				});
				
			}
		}
	}
}

}

function get_image_array(itemNode) {
var image_ids_node = itemNode.getElementsByTagName('image_id');
var image_paths_small_node = itemNode.getElementsByTagName('image_path_small');
var image_width_small_node = itemNode.getElementsByTagName('image_width_small');
var image_height_small_node = itemNode.getElementsByTagName('image_height_small');

var image_paths_medium_node = itemNode.getElementsByTagName('image_path_medium');
var image_width_medium_node = itemNode.getElementsByTagName('image_width_medium');
var image_height_medium_node = itemNode.getElementsByTagName('image_height_medium');

var image_paths_large_node = itemNode.getElementsByTagName('image_path_large');
var image_width_large_node = itemNode.getElementsByTagName('image_width_large');
var image_height_large_node = itemNode.getElementsByTagName('image_height_large');

var image_titles_node = itemNode.getElementsByTagName('image_title');

var image_array = new Array();
var i = 0;
	
if (window.ActiveXObject) {	
	image_array['image_id'] = image_ids_node[i].text;
	
	image_array['image_path_small'] = image_paths_small_node[i].text;
	image_array['image_width_small'] = image_width_small_node[i].text;
	image_array['image_height_small'] = image_height_small_node[i].text;
	
	image_array['image_path_medium'] = image_paths_medium_node[i].text;
	image_array['image_width_medium'] = image_width_medium_node[i].text;
	image_array['image_height_medium'] = image_height_medium_node[i].text;
	
	image_array['image_path_large'] = image_paths_large_node[i].text;
	image_array['image_width_large'] = image_width_large_node[i].text;
	image_array['image_height_large'] = image_height_large_node[i].text;
	
	image_array['image_title'] = image_titles_node[i].text;
}
else {
	image_array['image_id'] = image_ids_node[i].textContent;
	image_array['image_path_small'] = image_paths_small_node[i].textContent;
	image_array['image_width_small'] = image_width_small_node[i].textContent;
	image_array['image_height_small'] = image_height_small_node[i].textContent;
	
	image_array['image_path_medium'] = image_paths_medium_node[i].textContent;
	image_array['image_width_medium'] = image_width_medium_node[i].textContent;
	image_array['image_height_medium'] = image_height_medium_node[i].textContent;
	
	image_array['image_path_large'] = image_paths_large_node[i].textContent;
	image_array['image_width_large'] = image_width_large_node[i].textContent;
	image_array['image_height_large'] = image_height_large_node[i].textContent;
	
	image_array['image_title'] = image_titles_node[i].textContent;
}

return image_array;

}

function loadImages() {
products_id = $('products_id').getProperty('value');

var img_indicator = new Element('img', {
	'src' : indicator_url,
	'class' : 'indicator_image'
});
$('image_medium_container').empty();
img_indicator.injectInside($('image_medium_container'));

if ($('opt_id_used')) {
	var opt_id_used = $('opt_id_used').getProperty('value');
}
else {
	var opt_id_used = '';
}
if (opt_id_used !== '') {		
//combo box
	if ($('attrib-' + opt_id_used)) {
		var option_used = $('attrib-' + opt_id_used);
		var options_values_id = option_used.getProperty('value');
		option_used.addEvent('change', loadImages);
	}
//radio button
	else {
		//var option_used = document.forms['cart_quantity'].elements['id[' + opt_id_used + ']'];
		var all_inputs = $$('input');
		var option_used = new Array();
		var counter_opt = 0;
		for (var i=0; i < all_inputs.length; i++) {
			var match_me = 'attrib-' + opt_id_used;
			if ( all_inputs[i].getProperty('id') != null && all_inputs[i].getProperty('id').match(match_me) != null) {
				var used_input = all_inputs[i];
				option_used[counter_opt] = used_input;
				counter_opt++;
			}
		}
		var options_values_id = getCheckedValue(option_used);
		
		if (options_values_id == '') {
			options_values_id = option_used[0].getProperty('id').replace('attrib-' + opt_id_used + '-', '');
		}
		for (var i=0;i<option_used.length;i++) {
			option_used[i].addEvent('click', loadImages);
		}
	}
	submit_values('AJAX_servers/AJAX_image_swapper_server.php', ['action', 'products_id', 'options_id', 'options_values_id', 'id'], ['loadImages', products_id, opt_id_used, options_values_id, Number(new Date)]);
}
else {
	submit_values('AJAX_servers/AJAX_image_swapper_server.php', ['action', 'products_id', 'id'], ['loadImages', products_id, Number(new Date)]);
}

}

// return the value of the radio button that is checked
// return an empty string if none are checked, or
// there are no radio buttons
function getCheckedValue(radioObj) {
if(!radioObj) {
alert('1');
return "";
}
var radioLength = radioObj.length;
if(radioLength == undefined)
if(radioObj.checked)
return radioObj.value;
else
return "";
for(var i = 0; i < radioLength; i++) {
if(radioObj[i].checked) {
return radioObj[i].value;
}
}
return "";
}

//example: submit_values('AJAX_servers/AJAX_image_swapper_server.php', ['action', 'new_order','new_title','image_id', 'option_id', 'id'], ['update', new_order, new_title, image_id, option_id, Number(new Date)]);
function submit_values(url, key_list, value_list) {
var url_string = '';

for(var i=0; i<key_list.length;i++) {
	if (i > 0) {
		url_string += '&' + key_list[i] + '=' + value_list[i];
	}
	else {
		url_string += key_list[i] + '=' + value_list[i];
	}
}

if (window.ActiveXObject) {
	xHRObject.open("GET", url + "?" + url_string, true);	
	xHRObject.onreadystatechange = getData;
}
else if (window.XMLHttpRequest) {
	xHRObject.onreadystatechange = getData;
	xHRObject.open("GET", url + "?" + url_string, true);	
}
xHRObject.send(null);

}


would it be worth installing and reinstalling the image swapper?
28 Apr 2009, 5:51 PM
#7
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Post #7 by bunyip

Just looked close - there is a document element with id=productGeneral, so disregard that comment.

In your stylesheet.css,
change this line (line 636):

/*.content,*/ #productDescription, .shippingEstimatorWrapper 

to this

/*.content,*/ #productDescription, .shippingEstimatorWrapper {}

and your product description will magically appear....

Neville
An assumption is what you arrive at when you get tired of thinking...

28 Apr 2009, 5:58 PM
#8
thebuz avatar

thebuz

Zen Follower

Join Date:
Apr 2009
Posts:
84
Plugin Contributions:
0

Post #8 by thebuz

bunyip:

Just looked close - there is a document element with id=productGeneral, so disregard that comment.

In your stylesheet.css,
change this line (line 636):

/.content,/ #productDescription, .shippingEstimatorWrapper

> to this
> ```
/*.content,*/ #productDescription, .shippingEstimatorWrapper {}

and your product description will magically appear....

wow i was way off, thank you so much :clap: and it was so simple, i owe you