Zen Cart Logo
Forums / General Questions / A few questions

A few questions

Locked

Views: 7,913

Results 41 to 45 of 45
This thread is locked. New replies are disabled.
18 Aug 2006, 5:44 PM
#41
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

A few questions

                      $tmp_value = $_SESSION['cart']->contents[$_GET['products_id']]['attributes_values'][$products_options_names->fields['products_options_id']];

That is the value I am feeding it, so if I change it in the other place, with just if statements, won't that mess it up??

18 Aug 2006, 5:49 PM
#42
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

					    $tmp_html = '<input type="text" name="id[' . TEXT_PREFIX . $products_options_names->fields['products_options_id'] . ']" size="' . $products_options_names->fields['products_options_size'] .'" maxlength="' . $products_options_names->fields['products_options_length'] . '" value="' . if(fields['products_options_id'] == "txt_60"){echo htmlspecialchars($_GET['imgnumber'])}else{ htmlspecialchars($tmp_value)} .'" id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '" />  ';

I tried that it gives me

Parse error: parse error, unexpected T_IF in /homepages/30/d162063315/htdocs/zcart/fys/includes/modules/attributes.php on line 418

18 Aug 2006, 5:58 PM
#43
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

well I did it, it works perfectly, thank you for all the guidance I recieved.

$tmp_html = '<input type="text" name="id[' . TEXT_PREFIX . $products_options_names->fields['products_options_id'] . ']" size="' . $products_options_names->fields['products_options_size'] .'" maxlength="' . $products_options_names->fields['products_options_length'] . '" value="';
			// BEGIN THE CODE I ADDED TO CHANGE THE VALUE OF TEXT FIELDS
	if ($products_options_names->fields['products_options_id'] == "60") {
		$tmp_html .= htmlspecialchars($_GET['imgnumber']);
	}else { 
		$tmp_html .= htmlspecialchars($tmp_value);
	} 
	// END THE CODE I CREATED
				$tmp_html .= '" id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '" />  ';
18 Aug 2006, 6:12 PM
#44
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: A few questions

Congratulations on getting it working.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

18 Aug 2006, 6:15 PM
#45
businessman332211 avatar

businessman332211

New Zenner

Join Date:
Aug 2006
Posts:
35
Plugin Contributions:
0

Re: A few questions

Thanks I also think I learnt the system enough to be able to do a lot not, thanks for the guidance and direction.