- This topic is empty.
-
AuthorPosts
-
September 11, 2009 at 1:55 pm #26068brentMember
OK, here’s another question for you guys:
I’m, basically, trying to combine these two bits of code:
Code:ID, “product-size”, false);
if(!empty($productSize)) {
print ‘‘;
print ‘‘;
print ‘‘;
}
?>and
Code:ID, ‘dropdown-product-option’, false);
if ($allOptions) {
echo “;
foreach ($allOptions as $option) {
$fullValue = explode(“|”, $option);
$optionName = $fullValue[0];
$optionName = $fullValue[1];
echo ““; }
echo ““;
} else {
echo “$productCode $$price
“;
}}
?>The second one may be familiar, since Chris used it (assuming I typed it correctly) in one of his screencasts.
What I need to do is have the size of the product affect the price of the product. And I would like to do it the same way that Chris did: using a | to delineate the second part of the custom field and the php splitting the custom field at that marker and sending the second half as a option modifier that raises (or lowers) the price.
My custom fields are labeled according to the first set of code.
Does any of this make sense to anyone?
Can anyone help?
September 11, 2009 at 4:04 pm #63839brentMemberOK, I’ve banged my head against the wall a few hundred times and I came up with this:
Code:AuthorPostsViewing 2 posts - 1 through 2 (of 2 total)- The forum ‘Back End’ is closed to new topics and replies.