Forums / Setting Up Categories, Products, Attributes / Free Product set to Free showing Attribute Variable - help?

Free Product set to Free showing Attribute Variable - help?

Locked

Views: 2,765

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
3 Apr 2007, 11:07 PM
#1
netherworks avatar

netherworks

New Zenner

Join Date:
Feb 2006
Posts:
12
Plugin Contributions:
0

Free Product set to Free showing Attribute Variable - help?

Hello.

I'm running the latest version of Zen and I'm having a visual issue with Downloadable products set to be FREE.

Everything is set up correctly in the Attributes Controller and the Option Name I have is "Product Download" and the Value is "Zip File Archive".

It looks fine at regular price, but when I set the price to zero and set up product to display as "free" (so I can get the FREE graphical icon) I get this:

Zip File Archive [was: +$0.00 now is: Free]

Is there a way to make it just say "Zip File Archive" without the "[was: +$0.00 now is: Free]" addendum to the end? Is there a setting I missed?

Did a search here but couldn't find anything. Any help would be greatly appreciated.

7 Apr 2007, 5:31 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Free Product set to Free showing Attribute Variable - help?

When setting up a Product that is a Download ...

1 Downloads are NOT Virtual Products

2 Downloads are NOT Always Free Shipping

If you want the Product to be Free set the Product as:
Product is Free YES

You would need to customize the code for the:
/includes/modules/attributes.php

and copy to your templates and overrides directory ...

Then alter the display for this section of code around lines 143 to 161:

                    if ($products_options->fields['options_values_price'] != '0' and ($products_options->fields['product_attribute_is_free'] != '1' and $product_info->fields['product_is_free'] != '1')) {
                      // show sale maker discount if a percentage
                      $products_options_display_price= ' (' . $products_options->fields['price_prefix'] .
                      $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ') ';
                    } else {
                      // if product_is_free and product_attribute_is_free
                      if ($products_options->fields['product_attribute_is_free'] == '1' and $product_info->fields['product_is_free'] == '1') {
                        $products_options_display_price= TEXT_ATTRIBUTES_PRICE_WAS . $products_options->fields['price_prefix'] .
                        $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . TEXT_ATTRIBUTE_IS_FREE;
                      } else {
                        // normal price
                        if ($new_attributes_price == 0) {
                          $products_options_display_price= '';
                        } else {
                          $products_options_display_price= ' (' . $products_options->fields['price_prefix'] .
                          $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ') ';
                        }
                      }
                    }

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 May 2007, 4:22 PM
#3
wishy avatar

wishy

New Zenner

Join Date:
Jan 2007
Posts:
36
Plugin Contributions:
0

Re: Free Product set to Free showing Attribute Variable - help?

Ajeh:

When setting up a Product that is a Download ...

1 Downloads are NOT Virtual Products

2 Downloads are NOT Always Free Shipping

If you want the Product to be Free set the Product as:
Product is Free YES

You would need to customize the code for the:
/includes/modules/attributes.php

and copy to your templates and overrides directory ...

Then alter the display for this section of code around lines 143 to 161:

                if ($products_options->fields['options_values_price'] != '0' and ($products_options->fields['product_attribute_is_free'] != '1' and $product_info->fields['product_is_free'] != '1')) {
                  // show sale maker discount if a percentage
                  $products_options_display_price= ' (' . $products_options->fields['price_prefix'] .
                  $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ') ';
                } else {
                  // if product_is_free and product_attribute_is_free
                  if ($products_options->fields['product_attribute_is_free'] == '1' and $product_info->fields['product_is_free'] == '1') {
                    $products_options_display_price= TEXT_ATTRIBUTES_PRICE_WAS . $products_options->fields['price_prefix'] .
                    $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . TEXT_ATTRIBUTE_IS_FREE;
                  } else {
                    // normal price
                    if ($new_attributes_price == 0) {
                      $products_options_display_price= '';
                    } else {
                      $products_options_display_price= ' (' . $products_options->fields['price_prefix'] .
                      $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ') ';
                    }
                  }
                }

I'm trying to make this [was: now is:] disappear too. Is the above code the altered code or the code we need to adjust? I'm not a coder, so it means little to me.
26 Jun 2008, 7:04 AM
#4
ccembd avatar

ccembd

New Zenner

Join Date:
Apr 2008
Location:
Calif
Posts:
86
Plugin Contributions:
0

Re: Free Product set to Free showing Attribute Variable - help?

Ajeh:

When setting up a Product that is a Download ...

1 Downloads are NOT Virtual Products

2 Downloads are NOT Always Free Shipping

If you want the Product to be Free set the Product as:
Product is Free YES

You would need to customize the code for the:
/includes/modules/attributes.php

and copy to your templates and overrides directory ...

Then alter the display for this section of code around lines 143 to 161:

                if ($products_options->fields['options_values_price'] != '0' and ($products_options->fields['product_attribute_is_free'] != '1' and $product_info->fields['product_is_free'] != '1')) {
                  // show sale maker discount if a percentage
                  $products_options_display_price= ' (' . $products_options->fields['price_prefix'] .
                  $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ') ';
                } else {
                  // if product_is_free and product_attribute_is_free
                  if ($products_options->fields['product_attribute_is_free'] == '1' and $product_info->fields['product_is_free'] == '1') {
                    $products_options_display_price= TEXT_ATTRIBUTES_PRICE_WAS . $products_options->fields['price_prefix'] .
                    $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . TEXT_ATTRIBUTE_IS_FREE;
                  } else {
                    // normal price
                    if ($new_attributes_price == 0) {
                      $products_options_display_price= '';
                    } else {
                      $products_options_display_price= ' (' . $products_options->fields['price_prefix'] .
                      $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ') ';
                    }
                  }
                }

Ok finally I found a thread I needed the answer to.  However, since I am a chicken when it comes to altering code, bad experiences, can someone tell me where I can make the [was: +$0.00 now is: Free] $0.00 the actual price of the product?  This will at least make it look like I mean for that line to be there, until I build my courage to try messing with code again.

Thanks in advance.