I just love to see this thread. Any progress on this?
I just love to see this thread. Any progress on this?
http://www.moto-x.se - ZC 1.3.6
Try using instead of:
this:PHP Code:
$this->products[$index] = array ('model' => $products[$i]['model'] . $attr_value);
It only updates the model part. I would love to see a link to your site when this is ready!PHP Code:
$this->products[$index]['model'] = $products[$i]['model'] . $attr_value;
That was exactly what I've been doing! It worked like a charm.... the site is almost ready... I will post the link as soon as it's online. It is a matter of days. Thx!
A question I would have is what if I want to add the attribute before the model and have it based on attribute conditions. For example:
I have different sizes 1in, 1.5in, 2in. If I did it the way proposed, I get modelx1in. Obviously it's easy to reverse but I want it to display instead of 1in, 100 and instead of 1.5, 150 and so on.
I tried with this simple if statement but I've had no luck. I'm pretty new to PHP and was wondering if I could get your guys input.
Code:if ($value == PRODUCTS_OPTIONS_VALUES_TEXT_ID){ $attr_value = $products[$i]['attributes_values'][$option]; } else { $attr_value = $attributes->fields['products_options_values_name']; } $strModel_100 = "1in"; $strDisplay_100 = "100-"; if ($attr_value == $strModel_100){ $this->products[$index]['model'] = $strDisplay_100 . $products[$i]['model']; }
I got it sorted
Code:$strModel_100 = "1 in"; $strModel_100_display = "100-"; $strModel_150 = "1.5 in"; $strModel_150_display = "150-"; $strModel_200 = "2 in"; $strModel_200_display = "200-"; $strModel_300 = "3 in"; $strModel_300_display = "300-"; if ($attr_value == $strModel_100){ $this->products[$index]['model'] = $strModel_100_display . $products[$i]['model'] . " " . $attr_value; } if ($attr_value == $strModel_150){ $this->products[$index]['model'] = $strModel_150_display . $products[$i]['model'] . " " . $attr_value; } if ($attr_value == $strModel_200){ $this->products[$index]['model'] = $strModel_200_display . $products[$i]['model'] . " " . $attr_value; } if ($attr_value == $strModel_300){ $this->products[$index]['model'] = $strModel_300_display . $products[$i]['model'] . " " . $attr_value; }
Hi...
how is going this?
is there an example?
Thanks.
Byron H.
Yes... it is working.... www.eq-onweb.com
Bookmarks