Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    May 2005
    Location
    Sweden
    Posts
    151
    Plugin Contributions
    0

    Default Re: product_model based on attributes

    I just love to see this thread. Any progress on this?

  2. #12
    Join Date
    Aug 2004
    Location
    Germany
    Posts
    663
    Plugin Contributions
    0

    Default Re: product_model based on attributes

    Try using instead of:
    PHP Code:
    $this->products[$index] = array ('model' => $products[$i]['model'] . $attr_value); 
    this:
    PHP Code:
    $this->products[$index]['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!

  3. #13
    Join Date
    Dec 2005
    Posts
    34
    Plugin Contributions
    0

    Default Re: product_model based on attributes

    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!

  4. #14
    Join Date
    Sep 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: product_model based on attributes

    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']; 
    		  }

  5. #15
    Join Date
    Sep 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: product_model based on attributes

    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; 
    		  }

  6. #16

    Re: product_model based on attributes

    Hi...
    how is going this?
    is there an example?
    Thanks.
    Byron H.

  7. #17
    Join Date
    Dec 2005
    Posts
    34
    Plugin Contributions
    0

    Default Re: product_model based on attributes

    Yes... it is working.... www.eq-onweb.com

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v150 Interested in Attributes based upon Attributes add-on - Anyone else interested?
    By sports guy in forum All Other Contributions/Addons
    Replies: 10
    Last Post: 16 Jun 2015, 05:52 AM
  2. Backslash gets stripped from Product_Model
    By LuMe96 in forum Basic Configuration
    Replies: 4
    Last Post: 16 Nov 2007, 09:48 AM
  3. product_model based on attributes
    By duncdamonk in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 21 Sep 2006, 08:44 PM
  4. Sub-attributes? Making attributes of attributes appear based on which you select?
    By pioupioun in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Jun 2006, 11:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR