Jump to content
Latest News: (loading..)
nrlatsha

EZier New Fields

Recommended Posts

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


9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Share this post


Link to post
Share on other sites

Hi, under Step 2 the installation instructions states:

 

line:262

-----------------------------------------------------------------------------------

LOOK FOR: tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model...................

 

 

BEFORE: '" . $product['products_price'] .

ADD: '" . $product['products_retail_price'] . "',

-------------------------------------------------------------------------------------

 

Should this instead read ?

BEFORE: '" . tep_db_input($product['products_price']) . "',

ADD: '" . tep_db_input($product['products_retail_price']) . "',

 

I'm doing my first install and ran into some problems. Just want to make sure I'm doing it correctly. Thanks.

Share this post


Link to post
Share on other sites

Hi

 

Is there a quick way to do the same Discount totals for SPECIAL PRICES.

 

IE retail price= Our Special Price= You save=

 

 

I only need this on the PRODUCT INFO PAGE.

 

Thanks for your help.

Share this post


Link to post
Share on other sites

gbreynol -

line:262
-----------------------------------------------------------------------------------
LOOK FOR: tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model...................


BEFORE: '" . $product['products_price'] .
ADD: '" . $product['products_retail_price'] . "',
-------------------------------------------------------------------------------------

Should this instead read ?
BEFORE: '" . tep_db_input($product['products_price']) . "',
ADD: '" . tep_db_input($product['products_retail_price']) . "',

 

I'm with ya, and yes, you are right, I will update the instructions, good catch.

 

 

Maz - I'm working on a new version that will work with special prices and customer discount contrib. Should be done in a couple of days, if I didn't have this damned paying job, I'd be done with it. 13 hour nite-shifts just don't allow enough time to update code.

 

Also trying to modify customer contrib so it will take discount off of special prices, this is where I'm finding the hard part...

I'll post the update here when I'm done with it.... I might just give up on the customer contrib one and just make this compat with special prices...

 

Noel


9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Share this post


Link to post
Share on other sites

New version of EZier out here: http://www.oscommerce.com/community/contributions,1310

 

Change notes: 15 Apr 2004 05:00:59

(1) Updated instructions with completely new code

(2) Works with special prices now!

(3) This release will work if you do/don't have customer contrib installed. Don't need a sep mod

(4) For MS2, if you need it ported for the CVS version, lemme know and I'll post the fix here.

 

As always, questions, comments suggestions, post em here...

 

This does not modify the customer discount contrib as I stated before. Just updated for specials...

 

Noel


9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Share this post


Link to post
Share on other sites

Installed the contribution and it didn't work right for me. When I updated product with a retail price and updated, it would lose my product description. Now tax is not calculated automatically when entering the net price. It lists both net and gross as 25.9500.

 

One of the instructions went like this:

line:458-461

AFTER THESE LINES: ? ? ? ? ?<tr>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?<td class="main"><?php echo TEXT_PRODUCTS_PRICE; ?></td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price', $pInfo->products_price); ?></td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?</tr>

ADD THESE LINES: ? ? ? ? ? ? ?<tr>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?<td class="main"><?php echo TEXT_PRODUCTS_RETAIL_PRICE; ?></td>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?	<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_retail_price', $pInfo->products_retail_price); ?></td>
? ? ? ? ? ? ? ? ? ? ? ? ? ?	</tr>

 

The problem I ran into here, was that I couldn't find those lines at all. The closest I could find went TEXT_PRODUCTS_PRICE_NET or TEXT_PRODUCTS_PRICE_GROSS or something along those lines.

 

I uninstalled the contrib so that I could continue adding products until a solution is found and the funny thing is in the admin section under My Store, on the bottom there is still an entry for changing decimal places for the contribution and it still doesn't calculate tax at all. Decimal is still at 4 places such as 25.9900. What could be happening? I undid all the work, uploaded original files and now I run into these problems? I'm at a loss. :(

 

Any help is greatly appreciated! :D

Edited by lostxpinoy

Share this post


Link to post
Share on other sites

New Version out there 3.3

 

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

 

Change notes: 17 Apr 2004 15:35:59

 

(1) Fixed incorrect functions calls for "display_price" for those without customer discount contribution.

 

(2) Fixed inforrect input field for categories.php.


9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Share this post


Link to post
Share on other sites

lostxpinoy - There shouldn't have been any mods made to the price gross field for updating tax, I'd have to take a look at your categories.php file to determine what caused that. But then again, you said you reverted to your backup files (I love those files!) and it still happened. Forgive me, but the next quesiton I'd have to ask is if you are selecting "taxable goods" under the tax class field.

 

I updated the instructions for the code snippet you placed. I have no idea how that one stayed in there. I looked at new categories.php files and found my instructions have been off since the inception of my mods to this contrib. I'm surprised nobody else found that one.

 

The part about EZier new decimal places will stay there unless you go into your dbase and kill it. This will only affect decimal places for this contribution. Is it still showing 4 decimal places on your products pages?


9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Share this post


Link to post
Share on other sites

HELP PLease :) I have easy new fields installed and for some reason it only displays 1-3 numbers. eg THe price at top of teh page is correct say $2999 however ez new fields displays it as 2 or 29.... is there a simple fix for this??

Share this post


Link to post
Share on other sites

onliner - Which version of EZ do you have installed?

 

Do you have a link to see it at? Or is this just on a testing server?


9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Share this post


Link to post
Share on other sites

not so old. the 1 whereyou can update decimal plases in admin. is this possibly a bug in that version. if i do update can i only update the product_info code?

Share this post


Link to post
Share on other sites

Yup, that is the only code that needs updated, everything else stays the same.


9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Share this post


Link to post
Share on other sites

Hi, Thankyou for your replies. I am still having major problems with this contribution onmy site. Very possibly i am doing something wrong so i have tried a fresh product_info page. firstly with the existing EZ new feilds contribution and i have the same error of prices above $999 showing as only 1 0r 2 digits "ie $2900 is displayed as the price next to the model on the product info page, but on the ez new feilds section it will display 2, or 29. The same problem happens in teh retail price section." i have tried to replace the code with the new product_info code from a more recent version but doesnt seem to display.. any suggestions? i can post the code if u want.

Share this post


Link to post
Share on other sites

HI, I have fixed my above problem. as yet untested and dont no what teh consequences of my change is but what i did was:changed the below code to remove the + 0.0:

 

$list_price = substr(($currencies->display_price($product_info['products_retail_price'], tep_get_tax_rate($product_info['products_tax_class_id']))),1) ;

** $list_price =$list_price + 0.0; //REMOVED +0.0

$our_price = substr(($currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']))),1);

** $our_price = $our_price + 0.0; //REMOVED +0.0

$savings_a = (($our_price / $list_price) * 100);

$savings = (100 - $savings_a);

$savings = round($savings);

Share this post


Link to post
Share on other sites

Do you have a copy of the code you were originally using? The entire part from the popup function to the stripslash function.


9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Share this post


Link to post
Share on other sites
Hi, Thankyou for your replies. I am still having major problems with this contribution onmy site. Very possibly i am doing something wrong so i have tried a fresh product_info page. firstly with the existing EZ new feilds contribution and i have the same error of prices above $999 showing as only 1 0r 2 digits "ie $2900 is displayed as the price next to the model on the product info page, but on the ez new feilds section it will display 2, or 29. The same problem happens in teh retail price section." i have tried to replace the code with the new product_info code from a more recent version but doesnt seem to display.. any suggestions? i can post the code if u want.

I have the same problem on MS1

with EZ v. 2.1

Share this post


Link to post
Share on other sites

My version of the contrib tested with MS2.

 

This is starting to sound like a problem with MS1...


9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Share this post


Link to post
Share on other sites
HI, I have fixed my above problem. as yet untested and dont no what teh consequences of my change is but what i did was:changed the below code to remove the + 0.0:

It works!

but I don't know whether it perform some errors in other situations

Share this post


Link to post
Share on other sites
It works!

but I don't know whether it perform some errors in other situations

$655.00

Retail Price: $1,040.00

You Save: $-65400%

 

:(

Share this post


Link to post
Share on other sites

It works! 

but I don't know whether it  perform some errors in other situations

$655.00

Retail Price: $1,040.00

You Save: $-65400%

 

:(

the problem is with

($our_price / $list_price)

when

$our_price = $our_price ;

$list_price = $list_price ;

 

655.00 / 1,040.00 = 655

 

 

when

$our_price = $our_price + 0.0;

$list_price = $list_price + 0.0;

 

655 / 1 = 655

Share this post


Link to post
Share on other sites

It calculates it like this:

 

List: $1000

Our: $555

 

100 - ((our / list) * 100)

 

100 - (555 / 1000 ) * 100)

100 - (.55 * 100)

100 - 55

44.5

round(44.5)

45

 

Savings: 45%

 

I don't understand where your errors are coming from.

 

iberua & onliner - if this is a problem because you have MS1, please let me know. I don't want to confuse anybody that is using MS2.

 

This contrib is only for MS2 and I will port it to CVS, but no one has asked this to be ported to MS1. I wouldn't understand why anyone is still using MS1, but everyone has their own reasons.

 

So. Are you guys using MS1? If so, could you please start PMing each other for this issue. I don't want anybody confusing this as a poorly written contrib when its not supported/tested for your version.


9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Share this post


Link to post
Share on other sites

I am getting an error message

 

Fatal error: Call to undefined function: display_price_nodiscount() in /home/adoole2/public_html/osc/product_info.php on line 121

 

 

where is this method?

 

I don't have any other contribution installed, do I need any other contribution?

Share this post


Link to post
Share on other sites

benjamine_df - That is correct, nothing broke, I missed a function in the install readme, instructions updated.


9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

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

×