Jump to content
nrlatsha

EZier New Fields

Recommended Posts

I added this contribution today and am getting this error message when I attempt to add a new product to the site.

 

I am testing it on a not yet opn site so it is not on one of my active sites but did I do something wrong on installation?

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/mydomain/.panel/web/ecommerce/os/catalog/admin/includes/functions/database.php:13) in /home/mydomain/.panel/web/ecommerce/os/catalog/admin/includes/functions/database.php on line 13

 

*** I inserted the words mydomain to not put that information in here. ***

 

 

hi

thats normally shown when a main code file has been uploaded to the languages directory by accident.

 

Might be worth checking the right files went in the right dir's!

 

F5

Share this post


Link to post
Share on other sites

Product Listing

 

Followed Steps and got it to work 1-7 steps..no problem

 

Steps 8-11 (to display saving and retail price on product listing), I do see the heading "savings" and "retail price"

however there are no number in that field..I see

 

Price

Share this post


Link to post
Share on other sites

Install Steps 8-11 (Display retail price in product listing )

got this error

 

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_description pd, products p left ' at line 1

 

select p.products_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_retail_price, 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_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '131' order by pd.products_name limit 0, 20

 

[TEP STOP]

 

Anyone recieved this error message ?

Share this post


Link to post
Share on other sites

Install Steps 8-11 (Display retail price in product listing )

got this error

 

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_description pd, products p left ' at line 1

 

select p.products_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_retail_price, 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_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '131' order by pd.products_name limit 0, 20

 

[TEP STOP]

 

Anyone recieved this error message ?

Please Help

Thanks a lot

Share this post


Link to post
Share on other sites

I have this contribution installed with Separate Pricing Per Customer:

http://www.oscommerce.com/community/contributions,716

It correctly displays the SPPC price but I'd like it to show the normal price too if a SPPC price exists.

Code looks like it would do this, but it's not working.

I was assuming the $cust_flag had something to do with it...

 

 

if ($special_flag == true) 
{
echo '<tr><td class="pricetext">' . TEXT_PRODUCTS_PRICE_INFO . '</td><td class="pricestrike">' .  $our . '</td></tr>';
echo '<tr><td class="pricetextspecial">' . TEXT_PRODUCTS_PRICE_SPECIAL_INFO . '</td><td class="pricespecial">' . $special_price . '</td></tr>';
} else if ($cust_flag == true) { 
echo '<tr><td class="pricetext">' . TEXT_PRODUCTS_PRICE_INFO_REGULAR . '</td><td class="pricestrike">' .  $our . '</td></tr>'; 
echo '<tr><td class="pricetextcustomer">' . TEXT_PRODUCTS_PRICE_SPECIAL_CUST . '</td><td class="pricecustomer">' . $cust . '</td></tr>';
} else {
echo '<tr><td class="pricetext">' . TEXT_PRODUCTS_PRICE_INFO . '</td><td class="price">' . $our . '</td></tr>'; 
}

 

Result is below shows normal Retail Price as $100.

1310_retail.jpg

 

This one shows the Special Customer Price as $75.

Would like to show the $100 with strike through above the $75.

1310_sppc.jpg


Sam M. - Seattle

Share this post


Link to post
Share on other sites

This is a stupid question, but i am not a programmer, how can i remove the precentages from this module? What can i comment out?

 

Thanks

Danny

Share this post


Link to post
Share on other sites
This is a stupid question, but i am not a programmer, how can i remove the precentages from this module? What can i comment out?

 

Thanks

Danny

 

Go to catalog/includes/modules/ezier_new_fields.php.

Go to:

// 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>'

 

As you can see, the default option is both the amount and the percent. Delete the two slashmarks at the beginning of the line for what you want and put two slashmarks at the beginning of the default line.

 

That's it. B)

Share this post


Link to post
Share on other sites

Can use this to add a price field that does not show in the store, but only in admin? I need a cost number that is not retail, and only applies to selected items.

 

Len

Share this post


Link to post
Share on other sites
Can use this to add a price field that does not show in the store, but only in admin? I need a cost number that is not retail, and only applies to selected items.

 

Len

There is a multitude of Contributions for this purpose.

eg: seach "add new products fields" in the Contributions.

 

In future, use the search features.

Edited by Gob

Share this post


Link to post
Share on other sites
There is a multitude of Contributions for this purpose.

eg: seach "add new products fields" in the Contributions.

 

 

In future, use the search features.

 

 

I did use the search features, and read the contrib listings. I found the contrib your refering to, and several others. None of them mentioned being able to prevent the field from being shown in the product listing on the store side. I did find one for vendors, and it might have to do, but if there is one that will let me put in a dollar value, and incorperate it into a report, and have it show only on the admin side, it would be better.

 

So, if there are so many mods that can do this, would you like to point me to one?

 

Len

Share this post


Link to post
Share on other sites
I did use the search features, and read the contrib listings. I found the contrib your refering to, and several others. None of them mentioned being able to prevent the field from being shown in the product listing on the store side. I did find one for vendors, and it might have to do, but if there is one that will let me put in a dollar value, and incorperate it into a report, and have it show only on the admin side, it would be better.

 

So, if there are so many mods that can do this, would you like to point me to one?

 

Len

 

Try this one http://www.oscommerce.com/community/contributions,2779

 

IT should do the job. Just don't add the entries to the Product_ info file or any other files to the retail side of the store.

I used and modded a contrib that was old but simple, some time ago.

I apologise if you had already looked in the contrib's, but as with any contrib you will have to learn how to customise them to suit your purposes. Very rarely will you find exactly what you are looking for or it will look the way you want too.

Share this post


Link to post
Share on other sites

hello every one,

i have installed this contribution and its running great. the only problem i am having is when i add a specil price to a product the you save % thing doesnt change. It only changes when products price is changed

for example

if the

retail price : 100

product price : 50

you save 50%

 

now when i add this product to specials and special price is $25 , the you save thing should say 75% off but it still says 50% off

 

can any one please help me fix this

 

thankyou

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

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

 

Just have a look at the code between product_info.php and the code in the index.php page.

The index page is calculating from the wrong figure.

Do a comparison of the two lines of code. You should be able to easily figure it out.

Share this post


Link to post
Share on other sites
Just have a look at the code between product_info.php and the code in the index.php page.

The index page is calculating from the wrong figure.

Do a comparison of the two lines of code. You should be able to easily figure it out.

 

 

hey budy i have tried to compare the 2 files , but they are totally different. Also i followed the installation instructions in ezier new fields contribution but still the same result :(

Share this post


Link to post
Share on other sites

Well I tried to install this contribution. It seemed to go in okay, and the admin part of it seems to be working fine, but nothing at all shows on my product pages. :( Can anyone please help?

Share this post


Link to post
Share on other sites

Hi,,

 

 

Did anybody got this working with STS. I tried to figure it out but I'm not a star with php.

 

I hope that there is somebody out there that can help me out! And other st-user

 

Denice

Share this post


Link to post
Share on other sites
Hi,,

Did anybody got this working with STS. I tried to figure it out but I'm not a star with php.

 

I hope that there is somebody out there that can help me out! And other st-user

 

Denice

 

Ignore this post, it has nothing to do with sts, but with the product_listing_colum.php.

I have it showing in all in all the others like new products etc etc. etc.

 

Know only a solution for the product_listing_colum.php :blush:

Share this post


Link to post
Share on other sites
This should be a simple mod but I can't seem to make it work. :huh:

 

How do I get it to display just our price even if their is no retail price entered? Right now it just displays nothing at all so I have no prices on items that don't have the retail price entered...

 

Thanks in advance!

 

i'm having the same prob ! did you get it working? what was the problem?

Share this post


Link to post
Share on other sites
i'm having the same prob ! did you get it working? what was the problem?

 

 

With this mod nothing will show up until you enter either a R/Retail price (or a special price without R/R price it should show if I remember correctly).

 

I worked around this problem in two ways.

1. I added a mod called quick Stock updater, (this also needed moding to make it work as really needed and the R/R price field) but made it really easy to put in a recommend retail price.

2. The other is, I setup a "if" statement so that I could enter a price in the R/R field that was the same as my sell price hence then it would show the savings from the Sell price, but would then also not show a R/R price which was saying you were selling at full R/R.

 

For those interested in this No.2 modification here is the details of:

catalog/includes/modules/ezier_new_fields.php file.

<?php
/*
*  $Id: ezier_new_fields.php,v 5.00 2004/07/01 14:34:54 hpdl Exp $
*  osCommerce, Open Source E-Commerce Solutions
*  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)
*/
?>

<?
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_retail_price'] != $product_info['products_price'])
 if ($special_flag == false) 
  {
  echo TEXT_PRODUCTS_RETAIL_PRICE_INFO . '' . $retail . '';
  echo TEXT_PRODUCTS_PRICE_INFO_REGULAR . '' .  $our . '';
//   echo TEXT_PRODUCTS_PRICE_SPECIAL_INFO . $special_price . '</b></font>';
  echo TEXT_PRODUCTS_SAVE_INFO . $save2 . ' (' . $save . '%)</font>';
  } else if ($cust_flag == true) {
  echo TEXT_PRODUCTS_PRICE_INFO_YOUR . '' .  $our . '';
  echo TEXT_PRODUCTS_PRICE_INFO_REGULAR . '<s>' .  $our . '</s>';
  echo TEXT_PRODUCTS_PRICE_SPECIAL_CUST . $cust . '</b></font>';
  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_RETAIL_PRICE_INFO . '' . $retail . '';
  echo TEXT_PRODUCTS_PRICE_INFO_REGULAR . '' .  $our . '';
  echo TEXT_PRODUCTS_PRICE_SPECIAL_INFO . $special_price . '</b></font>';
  echo TEXT_PRODUCTS_SAVE_INFO . $save2 . ' (' . $save . '%)</font>';
  } else if ($cust_flag == true) {
  echo TEXT_PRODUCTS_PRICE_INFO_YOUR . '' .  $our . '';
  echo TEXT_PRODUCTS_PRICE_INFO_REGULAR . '<s>' .  $our . '</s>';
  echo TEXT_PRODUCTS_PRICE_SPECIAL_CUST . $cust . '</b></font>';
  echo TEXT_PRODUCTS_SAVE_INFO . $save2 . ' (' . $save . '%)</font>';
  } else {
  echo TEXT_PRODUCTS_RETAIL_PRICE_INFO . '' . $retail . '';
  echo TEXT_PRODUCTS_PRICE_INFO_REGULAR . '' .  $our . '';
  echo TEXT_PRODUCTS_PRICE_SPECIAL_INFO . $special_price . '</b></font>';
  echo TEXT_PRODUCTS_SAVE_INFO . $save2 . ' (' . $save . '%)</font>';
  }
  
   } else {  ?>
  <?php 

  }

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

 

Hope this helps a few.

 

John

Share this post


Link to post
Share on other sites

Hi

 

I have included the contrib and it works finde

But is there a way to when i add a product i can add the price with tax and osc say me how much is it without tax

 

i only have the prices included the tax so it would be nice when i can add the retailprice included tax

so i must not calculate each price without tax an add them

 

regards Chris

Share this post


Link to post
Share on other sites

Ok, first I apologize if this is an amatuer question.

 

I am having a difficult time understanding step one.

 

ALTER TABLE `products` ADD `products_retail_price` decimal(10,2) default NULL AFTER `products_price`;

 

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'EZier New Fields Decimal Places', 'NEW_FIELDS_DECIMAL', '0', 'Set the number of decimal places for your new fields', 1, 98, now(), now(), NULL, NULL);

 

If anyone can possibly clarify what it is I need to do, or point me to a link, it would be appreciated.

Share this post


Link to post
Share on other sites

hello:

 

Site: www.wholesalewizards.com

 

This might be a simple answer, since I did not see it requested in the first 12 pages... :D

 

I installed EZier (v 5.0) it is working great... the only problem is that it loses my theme when viewing the products.

 

I am using a template in the templates folder, but when I first viewed a product after install I got an error on line 12 of the includes/header.php. So I commented out the value there which was just some text stating that the header.php file should be used from the template folder. So now after commenting out that... I get the products_info.php page to display and all the correct fields and values are there, but it is no longer using my template... the header is blank, width went to 100% instead of 780px...

 

Where do I edit the default directory, so that it pulls the header.php and such from my template folder and not the root?

 

Thank You in advance for any help

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

×