Jump to content
nrlatsha

EZier New Fields

Recommended Posts

Hi Noel,

 

I have installed the Master Products contribution.  Can you tell me how to incorporate your codes into this:

 

Thanks,

David

 

Hello, I would first like to say thank you very much to the author of this contribution. Its a great contribution and well worth the donation. I'v installed it yesterday and today incorperated it with the contribution "Master Products". Requires minimal modification but if following the 'EZier New Fields' manual.. steps 8-11 are pretty much plug-in play.

 

Instead of modifying 'index.php' found on step 8, apply it to 'master_products.php' careful for some coding as on 'master' instead of "PRODUCT_LIST_PRICE" would be "MASTER_LIST_PRICE" etc.. not too difficult tho

 

Steps 9 would be "master_listing.php" instead of "product_listing.php"

 

If you wanted to organize your slave listing columns, after running the SQL command change Retail&Savings to your "Slave Product" Group ID

 

Hopes this helps out

Share this post


Link to post
Share on other sites
Post your EZier New Fields comments, suggestions and problems here. I receive lots of email on this contrib and thought it would be best to start answering publicly.

 

Get it here: http://www.oscommerce.com/community/contributions,1310

 

Basically it does this:

 

Retail Price : $ 79.99

Our Price : $ 39.99

You Save: 50%

 

I'll get around to the questions ASAP.  :D

 

Noel

 

Hi I just installed your contribution and im getting this now.

 

 

 

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' p.products_price) as final_price from products p, products_des

 

select p.products_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_retail_price, p.products_price) as final_price from products p, products_description pd, manufacturers m left join specials s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '14' order by pd.products_name limit 0, 20

 

[TEP STOP]

Share this post


Link to post
Share on other sites

Hey Guys,

 

Figured out a way to show the regular price (one you would enter in store if you did not have this contribution installed).

 

Basically, if you don't enter any EZ Fields info such as Retail Price, etc, it will just show your regular gross/net price.

 

In ezier_new_fields.php:

 

Find:

 

?>
	 <table>
	   <tr>
		 <td>
<?

 

Add directly after that:

 

$price_regular = osc_ez(($currencies->display_price($product_info['products_price'],tep_get_tax_rate($product_info['products_tax_class_id']))));
	$special_flag = false;
	$cust_flag = false;

 

then

 

Find: (around line 80 pre-modification, near the bottom, before the ending table HTML code)

 

else {

 

Add directly after that:

 

echo TEXT_PRODUCTS_PRICE_INFO . $price_regular;

 

That should pull the regular price without any percentages, or retail info, and just say for example:

 

Your Price: 199.99

 

This is good for people who haven't updated their Retail prices just yet, want to display a higher than normal retail price, or, want to display a retail price as your regular price without alerting the customer that you aren't giving them a discount off retail.

 

In theory, you can replace TEXT_PRODUCTS_PRICE_INFO with something like

 

echo '<br>Our Price:' . $price_regular;

 

In order to display for example:

 

Our Price: 199.99

 

Hope that helps some people looking for an alternative to updating everything right away.

 

Not sure how this will affect the way it displays on any other page than the product_info.php page, as that is all I am using this on right now. Looks and works good there tho.

 

Later!

Share this post


Link to post
Share on other sites

I've installed every part of this contribution and it looks great but there is a problem when I click on a category. If there is a special within that category, it doesn't account for the special price when calculating savings. It works with specials everywhere else in the store. I read this thread and searched, but didn't find an answer to my problem. If you could help me out, it would be appreciated.

 

Mike

Share this post


Link to post
Share on other sites

My ezier new fields doesn't display decimals for some reason... does anyone know why? Right now, it shows like this:

List Price: $12

Our Price: $7

You Save: $4 (33%)

The item price is actually $7.99 but it's only showing $7.. also the $4 should be $4.01...

 

can anyone tell me how to display decimals for all prices? Thanks!

Share this post


Link to post
Share on other sites
My ezier new fields doesn't display decimals for some reason... does anyone know why? Right now, it shows like this:

List Price: $12

Our Price: $7

You Save: $4 (33%)

The item price is actually $7.99 but it's only showing $7.. also the $4 should be $4.01...

 

can anyone tell me how to display decimals for all prices? Thanks!

oops.. it's in admin configuration under ezier new fields :)

Share this post


Link to post
Share on other sites
homewetbr - Go over the install again. This works if you do/don't have a retail price added to your listings.

If I leave the retail price out, I get nothing at all...and if I put ONLY the retail price, I get this:

 

Retail Price: $80.00

Your Price: $0.00

You Save: $80.00 (100%)

Status ? In Stock

 

So it's free???

 

Can someone help me remove the savings, and display only ONE PRICE. Preferably it would be "your price" as people hate to see they are paying full retail. If I keep the same retail and "your price" I get this:

 

Retail Price: $80.00

Your Price: $80.00

You Save: $0.00 (0%)

Status ? In Stock

 

This doesn't look too enticing either...this is the product/item I have been working on:

 

http://www.theturtlestore.com/product_id-65.html

 

THANKS!

 

I tried Alex's solution...and it didn't change anything.

Share this post


Link to post
Share on other sites
If I leave the retail price out, I get nothing at all...and if I put ONLY the retail price, I get this:

 

Retail Price: $80.00

Your Price: $0.00

You Save: $80.00 (100%)

Status ? In Stock

 

So it's free???

 

Can someone help me remove the savings, and display only ONE PRICE. Preferably it would be "your price" as people hate to see they are paying full retail. If I keep the same retail and "your price" I get this:

 

Retail Price: $80.00

Your Price: $80.00

You Save: $0.00 (0%)

Status ? In Stock

 

This doesn't look too enticing either...this is the product/item I have been working on:

 

http://www.theturtlestore.com/product_id-65.html

 

THANKS!

 

I tried Alex's solution...and it didn't change anything.

 

Copy and paste this file to the catalog/includes/ezier_new_fields.php

This should take care of all the problems.

Only thing you must do if you are putting a special on a product make sure you have something in the R/Retail filed.

This script below is setup so that if the R/R is the same as the Sell price (excluding any taxes) it will not display in the product info at all.

If there is a special but you don't know what the R/R would actually be, (enter the product sell price less tax in the R/R field) it will show the savings from your sell price.

If there is no special and or nothing entered in the R/R box it will also not display anything at all.

 

A couple of Specials examples here: http://www.trublue.net.au/shop/product_inf...products_id=877

http://www.trublue.net.au/shop/product_inf...products_id=551

 

You'll also notice that I have got rid of the strike throughs for the general customer product info pages.

I have not really worked on the Special Customer pricing strike throughs, but it should all still work properly if you have that Mod installed, I don't (yet). (job for ron)

 

<?php
if ($product_info['products_retail_price'] != 0) { 
// Get the retail price & clean up the decimal places
$retail = osc_ez(($currencies->display_price($product_info['products_retail_price'],tep_get_tax_rate($product_info['products_tax_class_id']))));
$special_flag = false;
$cust_flag = false;

 if ($new_price = tep_get_products_special_price($product_info['products_id'])) 
  {  // If there is a special ... Special Overrides customer discount...
$our = osc_ez(($currencies->display_price($product_info['products_price'],tep_get_tax_rate($product_info['products_tax_class_id']))));
$special_price = osc_ez(($currencies->display_price((tep_get_products_special_price($product_info['products_id'])),tep_get_tax_rate($product_info['products_tax_class_id']))),0,$strlen);
$save2 = tep_add_tax($product_info['products_retail_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) - tep_add_tax(tep_get_products_special_price($product_info['products_id']), tep_get_tax_rate($product_info['products_tax_class_id']));
$save2 = osc_ez($currencies->display_price($save2, ''));
$save = (((tep_get_products_special_price($product_info['products_id'])) / ($product_info['products_retail_price'])) * 100);
$special_flag = true;
  }

  if (((strstr($customer_discount, "-") != 0) && ((tep_get_products_special_price($product_info['products_id'])) == null))) 
  { // If there isn't a special, but still a customer discount... We'll need those decimals....
$retail = osc_ez(($currencies->display_price_nodiscount($product_info['products_retail_price'],tep_get_tax_rate($product_info['products_tax_class_id']))));
$our = ($product_info['products_price']);
$our = $our - $our * abs($customer_discount) / 100;
$save2 = tep_add_tax($product_info['products_retail_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) - tep_add_tax($our, tep_get_tax_rate($product_info['products_tax_class_id']));
$save2 = osc_ez($currencies->display_price_nodiscount($save2, ''));
$save = (($our / ($product_info['products_retail_price'])) * 100); 
$our = osc_ez($currencies->display_price_nodiscount($product_info['products_price'], ''));
$cust = osc_ez($currencies->display_price($product_info['products_price'], ''));
$cust_flag = true;
  } // End cust discount

  if ((strstr($customer_discount, "-") == 0) && ((tep_get_products_special_price($product_info['products_id'])) == null))  
  { // Just a regular price
$our = osc_ez(($currencies->display_price($product_info['products_price'],tep_get_tax_rate($product_info['products_tax_class_id']))));
$save = (($product_info['products_price'] / ($product_info['products_retail_price'])) * 100);

$save2 = tep_add_tax($product_info['products_retail_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) - tep_add_tax($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
$save2 = osc_ez($currencies->display_price($save2, ''));

  } // End of regular price

$save = (100 - $save);
$save = round($save);
?>

<?php  
 if ($product_info['products_price'] == 0) {
  echo TEXT_PRODUCTS_RETAIL_PRICE_INFO . $retail;
 } else if ($product_info['products_retail_price'] != $product_info['products_price'])
 if ($special_flag == false) 
  {
  echo TEXT_PRODUCTS_RETAIL_PRICE_INFO . $retail . '<br>';
  echo TEXT_PRODUCTS_PRICE_INFO_REGULAR . $our . '<br>';
  echo TEXT_PRODUCTS_SAVE_INFO . $save2 . ' (' . $save . '%)</font>';
  } else if ($cust_flag == true) {
  echo TEXT_PRODUCTS_PRICE_INFO_YOUR . $our . '<br>';
  echo TEXT_PRODUCTS_PRICE_INFO_REGULAR . '<s>' .  $our . '</s><br>';
  echo TEXT_PRODUCTS_PRICE_SPECIAL_CUST . $cust . '</b></font><br>';
  echo TEXT_PRODUCTS_SAVE_INFO . $save2 . ' (' . $save . '%)</font>';
  } else {
  }

  if ($special_flag == true) if ($product_info['products_retail_price'] == $product_info['products_price'])
  {
  echo TEXT_PRODUCTS_PRICE_INFO_REGULAR . $our . '<br>';
  echo TEXT_PRODUCTS_PRICE_SPECIAL_INFO . $special_price . '</b></font><br>';
  echo TEXT_PRODUCTS_SAVE_INFO . $save2 . ' (' . $save . '%)</font>';
  } else if ($cust_flag == true) {
  echo TEXT_PRODUCTS_PRICE_INFO_YOUR . $our . '<br>';
  echo TEXT_PRODUCTS_PRICE_INFO_REGULAR . '<s>' .  $our . '</s><br>';
  echo TEXT_PRODUCTS_PRICE_SPECIAL_CUST . $cust . '</b></font><br>';
  echo TEXT_PRODUCTS_SAVE_INFO . $save2 . ' (' . $save . '%)</font>';
  } else if ($product_info['products_price'] == 0) {
  echo TEXT_PRODUCTS_PRICE_SPECIAL_INFO . $special_price . '</b></font><br>';
  echo TEXT_PRODUCTS_SAVE_INFO . $save2 . ' (' . $save . '%)</font>';
  } else {
  echo TEXT_PRODUCTS_RETAIL_PRICE_INFO . $retail . '<br>';
  echo TEXT_PRODUCTS_PRICE_INFO_REGULAR . $our . '<br>';
  echo TEXT_PRODUCTS_PRICE_SPECIAL_INFO . $special_price . '</b></font><br>';
  echo TEXT_PRODUCTS_SAVE_INFO . $save2 . ' (' . $save . '%)</font>';
  }
} else {
?>

<?php 
  }
// End EZier new fields contrib (Noel Latsha)
?>

 

Also you may need to alter the defines in the launguages/english.php file. This is mine

// Begin EZier new fields
define('TEXT_PRODUCTS_RETAIL_PRICE_INFO', 'R/Retail Price: ');
define('TEXT_PRODUCTS_PRICE_INFO_YOUR', 'Your Regular Discounted Price: ');
define('TEXT_PRODUCTS_PRICE_INFO_REGULAR', 'Regular Price: ');
define('TEXT_PRODUCTS_SAVE_INFO', '<font color=red>You Save: ');
define('TEXT_PRODUCTS_RETAIL_PRICE', 'Products Retail Price: ');
define('TEXT_PRODUCTS_PRICE_SPECIAL_INFO', '<font color=red><b>Your Special Price: ');
define('TEXT_PRODUCTS_PRICE_SPECIAL_CUST', '<font color=red>Your Discounted Price: ');
// EZier new fields end

Edited by Gob

Share this post


Link to post
Share on other sites
That is a big help, THANKS! Now if I could just move the price over where it was...like under the product name by the stock status...

 

Which price figure are you talking about that you want to move?

 

Also I note that this product for example is still displaying the R/R price.

http://www.theturtlestore.com/product_id-61.html

 

I would guess that this is because when you enter the R/R price in it's field it has to be exactly the same.

EG: Sell Price 12.0023 and R/R 12.0023

You must enter the 4 digits past the decimal the same as.

If you can't do this you may need to edit your database table config.

In the Products table you will have products_retail_price it must be the same as products_price. "decimal(15,4)"

That is all that may need altering, just the "Type" field.

 

Also my recommendation would be to put a white background or something on your prices or change the Savings colour to the orange/yellow the same as your product description. You can't read the red at all without looking really hard, which is not usually what you want.

 

Hope this gets most of it sorted

Share this post


Link to post
Share on other sites

hi guys,

 

After i installed this nice contri. i found out, the price in product_info.php page:

 

<?php echo $products_price; ?>

 

and

 

<?php

}

include(DIR_WS_MODULES . 'ezier_new_fields.php');

?>

 

 

they are both show in product_info.php page,

 

i do enter retail value for item, then it shows product price twice, otherwize, it shows price correctly.

 

anybody found this small problem or just me?

 

Is there any way use " if else" to only show <?php echo $products_price; ?> if retail price don't have value in it?

 

Thanks

 

sean

Edited by minghoo

Share this post


Link to post
Share on other sites
hi guys,

 

After i installed this nice contri. i found out, the price in product_info.php page:

 

<?php echo $products_price; ?>

 

and

 

<?php

}

include(DIR_WS_MODULES . 'ezier_new_fields.php');

?>

they are both show in product_info.php page,

 

i do enter retail value for item, then it shows product price twice, otherwize, it shows price correctly.

 

anybody found this small problem or just me?

 

Is there any way use " if else" to only show <?php echo $products_price; ?> if retail price don't have value in it?

 

Thanks

 

sean

 

 

Finally,

 

add this code in product_info.php, if you want to show price only if you have retail value, otherwise it keep original price:

 

<?php
if ($product_info['products_retail_price'] !=0)
{
include(DIR_WS_MODULES . 'ezier_new_fields.php'); 
} else {
echo $products_price;
} 
?>

 

 

sean

Share this post


Link to post
Share on other sites

EzFields and Easy Populate problems. :(

 

 

Please help. Easy Populate will not let me update the EzFields retail price field.

 

 

Here is the situation:

 

Each contribution works great by itself. Easy Populate works fine--I can upload and update my database easily. Also, EzFields works great. If I manually enter a "retail price" using the osc Admin (under Catalog > Categories/Products > etc.) then that specific product displays perfectly on the website with "retail price" and "your price" together. (The "retail price" doesn't display on the category listing, only the "products_info.php," but I can live with that. Probably a syntax error I can catch later, once I solve the bigger problem.)

 

My problem is, Easy Populate refuses to acknowledge the EzFields' "products_retail_price" field. :(

 

 

Here's what I tried:

 

First, I added the "products_retail_price" field manually to my database (using Excel). Then I modified "catalog/admin/easypopulate.php" to try to make it grab the "products_retail_price" field. Nothing. Next, I tried following the instructions in "New Fields for EasyPopulate" (a contribution on this site). Nothing. When that didn't work, I went through and everywhere there was a reference to "products_price" in easypopulate.php, I added a "products_retail_price" beneath it.

 

No luck. Nothing. I finally reached the point where EasyPopulate does upload the "products_retail_price". I know this because I see the retail price listed next to the regular price on the Easy Populate results page (after I upload the database, you know?).

 

So! I know Easy Populate is grabbing the "products_retail_price" field. However... it does nothing with it. None of the retail prices appear in my website. Only the ones I update manually through the Admin (described above) appear. Ones I try to upload easing Easy Populate never appear. Even worse, when I download the database using Easy Populate, I see that the "products_retail_price" is not in that file. :(

 

How do I make Easy Populate grab and use my EzFields retail price?

 

 

Thanks very much for any help you can give! This is making me crazy!

Share this post


Link to post
Share on other sites

As you have stated it works when you add the R/R through the the normal method of updating products.

The issue is clearly a problem "Easy Populate", it not been configured properly for the extra fields. eg: not exporting the empty field or the correctly named empty field in the first place and or them not import correctly.

I'v had nothing to do with Easy Populate as yet except a very brief look at it, personally just from I looked at I think there is easier ways to populate. keep updated.

 

EzFields and Easy Populate problems. :(

Please help. Easy Populate will not let me update the EzFields retail price field.

Here is the situation:

 

Each contribution works great by itself. Easy Populate works fine--I can upload and update my database easily. Also, EzFields works great. If I manually enter a "retail price" using the osc Admin (under Catalog > Categories/Products > etc.) then that specific product displays perfectly on the website with "retail price" and "your price" together. (The "retail price" doesn't display on the category listing, only the "products_info.php," but I can live with that. Probably a syntax error I can catch later, once I solve the bigger problem.)

 

My problem is, Easy Populate refuses to acknowledge the EzFields' "products_retail_price" field. :(

Here's what I tried:

 

First, I added the "products_retail_price" field manually to my database (using Excel). Then I modified "catalog/admin/easypopulate.php" to try to make it grab the "products_retail_price" field. Nothing. Next, I tried following the instructions in "New Fields for EasyPopulate" (a contribution on this site). Nothing. When that didn't work, I went through and everywhere there was a reference to "products_price" in easypopulate.php, I added a "products_retail_price" beneath it.

 

No luck. Nothing. I finally reached the point where EasyPopulate does upload the "products_retail_price". I know this because I see the retail price listed next to the regular price on the Easy Populate results page (after I upload the database, you know?).

 

So! I know Easy Populate is grabbing the "products_retail_price" field. However... it does nothing with it. None of the retail prices appear in my website. Only the ones I update manually through the Admin (described above) appear. Ones I try to upload easing Easy Populate never appear. Even worse, when I download the database using Easy Populate, I see that the "products_retail_price" is not in that file. :(

 

How do I make Easy Populate grab and use my EzFields retail price?

Thanks very much for any help you can give! This is making me crazy!

Share this post


Link to post
Share on other sites

Hi,

This contribution work very well, but it isn't integrate with default Special contribution and naturally others contributions, like with "Admin Specials by Categories" or . The "EZier New Fields" contribution is alternative to Special contrib. So, you can modify the price in two way in the same time, in the new fields and in Admin/specials, but only the last modification update the special box in the main page.

 

Can you tell me how to integrate EZier New Fields with the Special contributions. If it is possible.

 

Many thanks

(and sorry for my bad english)


gersio

Share this post


Link to post
Share on other sites
hey guys i have got the specials discount you save % to show up on the product_info page but when ever i put a product on specials the discount you save doesnt show up correctly on product > index.php page.

 

eg.

on product_info.php page

 

White/black shoes

 

Retail Value: $65.95

our value: $39.99

specials: $29.99

You Save 55% ($35.96)

 

now for the same item on index.php page (where all the products show up int he category)

 

white/black shoes

Retail value: $65.95

our value: $39.99

specials: $29.99

You Save 39%

 

see its showing 39% isntead of 55%

now if i remove this item form specials the discount is 39%

 

can any one please help me out

 

thankyou

 

Hello,

I have the same problem. But I see that this question is still looking forward to a reply.

 

Help!


gersio

Share this post


Link to post
Share on other sites

Great contribution, but I'm also having the same problem with % off not displaying properly in the index.php on items in the special category.

Share this post


Link to post
Share on other sites

Here is a fix for those that have noticed that the index.php does not display the correct percentage off for products that are on special.

 

In the catalog/includes/modules/product_listing.php

find:

// EZier New Fields added

case 'PRODUCT_LIST_SAVE':

$lc_align = 'right';

if ((tep_not_null($listing['products_retail_price'])) && ($listing['products_retail_price']) > 0) {

$lc_save = round(100 - (( $listing['products_price'] / $listing['products_retail_price'] ) * 100 ));

$lc_text = '<font color="red">?' . $lc_save . '%?</font>';

} else {

$lc_text = '?';

}

break;

 

replace with: (changes in bold)

// EZier New Fields added

case 'PRODUCT_LIST_SAVE':

$lc_align = 'right';

if (tep_not_null($listing['specials_new_products_price'])) {

$lc_save = round(100 - (( $listing['specials_new_products_price'] / $listing['products_retail_price'] ) * 100 ));

$lc_text = '<font color="red">?' . $lc_save . '%?</font>';

} else {

if ((tep_not_null($listing['products_retail_price'])) && ($listing['products_retail_price']) > 0) {

$lc_save = round(100 - (( $listing['products_price'] / $listing['products_retail_price'] ) * 100 ));

$lc_text = '<font color="red">?' . $lc_save . '%?</font>';

} else {

$lc_text = '?';

}}

break;

 

Hope this helps.

Share this post


Link to post
Share on other sites

Thank you very much, Irparr.

Your fix is really helpful for my shop!

 

 

 

Here is a fix for those that have noticed that the index.php does not display the correct percentage off for products that are on special.

 

In the catalog/includes/modules/product_listing.php

find:

// EZier New Fields added

case 'PRODUCT_LIST_SAVE':

$lc_align = 'right';

if ((tep_not_null($listing['products_retail_price'])) && ($listing['products_retail_price']) > 0) {

$lc_save = round(100 - (( $listing['products_price'] / $listing['products_retail_price'] ) * 100 ));

$lc_text = '<font color="red">?' . $lc_save . '%?</font>';

} else {

$lc_text = '?';

}

break;

 

replace with: (changes in bold)

// EZier New Fields added

case 'PRODUCT_LIST_SAVE':

$lc_align = 'right';

if (tep_not_null($listing['specials_new_products_price'])) {

$lc_save = round(100 - (( $listing['specials_new_products_price'] / $listing['products_retail_price'] ) * 100 ));

$lc_text = '<font color="red">?' . $lc_save . '%?</font>';

} else {

if ((tep_not_null($listing['products_retail_price'])) && ($listing['products_retail_price']) > 0) {

$lc_save = round(100 - (( $listing['products_price'] / $listing['products_retail_price'] ) * 100 ));

$lc_text = '<font color="red">?' . $lc_save . '%?</font>';

} else {

$lc_text = '?';

}}

break;

 

Hope this helps.


gersio

Share this post


Link to post
Share on other sites

Could someone please help me with this contrib. I am pretty sure that when I first installed this, it worked fine, but now when I don't enter a retail price, no price shows up at all. I've read this whole thread and searched and the only thing I found was on page 12 and that didn't work. I've gone through the whole install again and still have the same results.

 

Does the ezier_new_fields.php file in the modules folder control this?

Share this post


Link to post
Share on other sites

Would this cause any problems that you can see? I modified the ezier_new_fields.php in the modules folder to look like this: (changes are near the end--> I added "echo TEXT_PRODUCTS_PRICE_INFO . $our;" and later "<?php echo $products_price; ?>")

 

<?php
/*
 $Id: ezier_new_fields.php,v 1.00 2004/07/01 14:34:54 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Released under the GNU General Public License

 Noel Latsha (nrlatsha@nabcomdiamonds.com)
 www.nabcomdiamonds.com
 www.devosc.com

// Begin EZier new fields contrib 5.0 (Noel Latsha)
*/
?>
	 <table>
	   <tr>
		 <td>
<? 
if ($product_info['products_retail_price'] != 0)
{ 
	// Get the retail price & clean up the decimal places
	$retail = osc_ez(($currencies->display_price($product_info['products_retail_price'],tep_get_tax_rate($product_info['products_tax_class_id']))));
	$special_flag = false;
	$cust_flag = false;

		if ($new_price = tep_get_products_special_price($product_info['products_id'])) 
			{  // If there is a special ... Special Overrides customer discount...
				$our = osc_ez(($currencies->display_price($product_info['products_price'],tep_get_tax_rate($product_info['products_tax_class_id']))));
				$special_price = osc_ez(($currencies->display_price((tep_get_products_special_price($product_info['products_id'])),tep_get_tax_rate($product_info['products_tax_class_id']))),0,$strlen);
				$save2 = osc_ez($currencies->display_price($product_info['products_retail_price'] - (tep_get_products_special_price($product_info['products_id'])), ''));
				$save = (((tep_get_products_special_price($product_info['products_id'])) / ($product_info['products_retail_price'])) * 100);
				$special_flag = true;
			}

			if (((strstr($customer_discount, "-") != 0) && ((tep_get_products_special_price($product_info['products_id'])) == null))) 
			{ // If there isn't a special, but still a customer discount... We'll need those decimals....
				$retail = osc_ez(($currencies->display_price_nodiscount($product_info['products_retail_price'],tep_get_tax_rate($product_info['products_tax_class_id']))));
				$our = ($product_info['products_price']);
				$our = $our - $our * abs($customer_discount) / 100;
				$save2 = osc_ez($currencies->display_price_nodiscount(($product_info['products_retail_price'] - $our), ''));
				$save = (($our / ($product_info['products_retail_price'])) * 100); 
				$our = osc_ez($currencies->display_price_nodiscount($product_info['products_price'], ''));
				$cust = osc_ez($currencies->display_price($product_info['products_price'], ''));
				$cust_flag = true;
			} // End cust discount

			if ((strstr($customer_discount, "-") == 0) && ((tep_get_products_special_price($product_info['products_id'])) == null))  
			{ // Just a regular price
				$our = osc_ez(($currencies->display_price($product_info['products_price'],tep_get_tax_rate($product_info['products_tax_class_id']))));
				$save = (($product_info['products_price'] / ($product_info['products_retail_price'])) * 100);
				$save2 = osc_ez($currencies->display_price($product_info['products_retail_price'] - $product_info['products_price'], ''));
			} // End of regular price

	$save = (100 - $save);
	$save = round($save); ?>
			</td>
		   </tr>
		  </table>
	<?php		
		echo TEXT_PRODUCTS_RETAIL_PRICE_INFO . '<s>' . $retail . '</s>'; 

		if ($special_flag == true) 
			{
			echo TEXT_PRODUCTS_PRICE_INFO . '<s>' .  $our . '</s>'; 
			echo TEXT_PRODUCTS_PRICE_SPECIAL_INFO . $special_price . '</font>';
			} else if ($cust_flag == true) { 
			echo TEXT_PRODUCTS_PRICE_INFO_REGULAR . '<s>' .  $our . '</s>'; 
			echo TEXT_PRODUCTS_PRICE_SPECIAL_CUST . $cust . '</font>';
			} else {
			echo TEXT_PRODUCTS_PRICE_INFO . $our; 
			}

// Uncomment the line that you want below, and comment our the default option if you like, description is to the right		
		// echo TEXT_PRODUCTS_SAVE_INFO . $save2 . '</font>';						  //This line is price shown
		// echo TEXT_PRODUCTS_SAVE_INFO . $save . '%</font>';							  //This line is % shown
		echo TEXT_PRODUCTS_SAVE_INFO . $save2 . ' (' . $save . '%)</font>';		  //This line is % and price together

		 	} else {
			 echo TEXT_PRODUCTS_PRICE_INFO . $our;
			 ?>
			<?php 
			echo $products_price; ?>
		  </td>
		</tr> 
	  </table>
	  <?php 

		 }

// End EZier new fields contrib (Noel Latsha)
?>

 

This works, but needs a little more work for the style of font. That's no problem, but I wanted to know if there's an easier way? Thanks,

 

Mike

Share this post


Link to post
Share on other sites

Hi,

For some odd reason after installing this mod the front page has the correct price but all items listed in particular categories shows the "retail price" without displaying the cheap price or displaying the % saved etc. I cant seem to figure out how or why its happening... any help would be appreciated.

Share this post


Link to post
Share on other sites

Im also trying to figure out how to have the price of the product be located under the picture from the main categories and front page. I attempted to edit the index.php file but couldnt figure out which line needs to be modified to simply add a <BR> statement.

Share this post


Link to post
Share on other sites

I tried Installing version 5.0 today, and after all is said and done i got the following error when trying to look at the product that I put the special pricing on

Fatal error: Call to undefined function: osc_ez() in /www/t/tcart/htdocs/includes/modules/ezier_new_fields.php on line 24

 

and suggestions on where i should start?????

 

Mark

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×