Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

EZier New Fields


nrlatsha

Recommended Posts

Great work sharkey, we must have both figured this out at the same time! :D Cool!!!!!

 

Actually, I don't mind if the font color goes black. I actually prefer it that way.

 

Best regards,

Paul

Edited by Paulie
Link to comment
Share on other sites

  • Replies 303
  • Created
  • Last Reply

Top Posters In This Topic

Those darn ; things kept confusing me but I finally got it, I would of left the font color but on one test all my prices disapeared, don't worry though the final change works great.

 

:lol: Just read your edit about prefering the black font, me too!

Edited by sharkey
Link to comment
Share on other sites

Actually, you don't have to lose the font color. Replace the code with this:

 

// EZier New Fields added
case 'PRODUCT_LIST_RETAIL_PRICE':
$lc_align = 'right';
if ((tep_not_null($listing['products_retail_price'])) && ($listing['products_retail_price']) > 0) {
$lc_text = '<font color="#55508a"><s>' . $currencies->display_price($listing['products_retail_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>'; 
} else {
$lc_text = ' ';
}
break;

 

Now you can make it any color you want. :D

 

Paul

Edited by Paulie
Link to comment
Share on other sites

Does missing that extra ; hurt it? I'm happy the way I've got it but just curious.

 

'</s>;';

 

vs

 

'</s>';

 

Edit: I was bored so I tested. I had an extra ; and you may remove it.

Edited by sharkey
Link to comment
Share on other sites

Not that I noticed but I already changed it.

 

Ok, for everyone who wants to keep the font color the same AND add strikethru do what Paulie said:

 

Final code:

// EZier New Fields added
case 'PRODUCT_LIST_RETAIL_PRICE':
$lc_align = 'right';
if ((tep_not_null($listing['products_retail_price'])) && ($listing['products_retail_price']) > 0) {
$lc_text = '<font color="#55508a"><s>' . $currencies->display_price($listing['products_retail_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>'; 
} else {
$lc_text = ' ';
}
break;

Link to comment
Share on other sites

Right. And just to recap, this code that needs to be modified is located in the catalog/includes/modules/product_listing.php

 

Another tip, if you do want to change the default font color to something else, just update the numbers that follow font color="#......." For example, I chose a grey color for the Retail strikethrough so that the "Price" really stands out in it's default black color. I used Paint Shop Pro to assist me in getting the HTML number for the shade of grey I chose. It is #808080. So I replaced the default:

 

'<font color="#55508a">

 

with

 

'<font color="#808080">

 

But you can make it any color you like as long as you have the correct HTML code for the color you choose.

 

Best regards,

Paul

Link to comment
Share on other sites

:wub:

Love you both, Sharkie and Paulie! Loved the strike thru!

Thanks for saving my neurones...

You made me use a dictionary. :angry: j/k

 

Neurones

 

: a grayish or reddish granular cell with specialized processes that is the fundamental functional unit of nervous tissue

 

Edit: Course that's just 'cause it's 3am and I need to go to bed, after I wrote this I was like "I know what a neuron is!" The spelling thru me off, nite all.

Edited by sharkey
Link to comment
Share on other sites

Nice work guys, it appears you have everything sorted out. I was posting the changes when I realized there was two more pages on the board.

 

Here's some help for color if anybody wants: http://www.allprofitallfree.com/color-wheel.html

 

http://www.colorschemer.com/online.html

 

I also see alot of new people using EZ, is there anything you'd like to see added?

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

 

Replace that and you're fine...

Link to comment
Share on other sites

Ok folks, on the product page, how do I get it to say "Your price: EUR 87.00" instead of "Your price: 87.00" , i.e. how do I include the currency symbol?

 

I believe the change must be made in ezier_new_fields.php.

 

Any help is appreciated as I am not familiar with PHP.

 

Thank you.

Link to comment
Share on other sites

Ok folks, on the product page, how do I get it to say "Your price: EUR 87.00" instead of "Your price: 87.00" , i.e. how do I include the currency symbol?

 

I believe the change must be made in ezier_new_fields.php.

 

Any help is appreciated as I am not familiar with PHP.

 

Thank you.

This is actually 2 separate questions:

 

Q1: You want it to say EUR on the left instead of the right.

 

A1: Default OSC is to have EUR on the right. You'll have to go into Admin->Localization->Currencies and change the options for it to be set on the left instead of the right.

 

Q2: When I set it to the right, it cuts off part of my currency symbol.

 

A2: This was a problem with this contrib from the start, anybody with a currency symbol on the right got cut off, or part of it. I kinda put this off to the side due to other projects, but I'll just need to update the cutting function. If you set it to 2 decimal places, everything will work fine.

 

So, the workaround until I update the function is to set it to 2 decimal places.

 

Look back for the updated contrib soon.

 

Your probably saying, "yeah, right"... :P

 

Noel

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

 

Replace that and you're fine...

Link to comment
Share on other sites

Thanks that'll do.

 

Now I've installed the contribution in my shop and I get the following error on the product_info.php page:

 

Fatal error: Call to undefined function: osc_ez() in /home/www/ww7541/html/mywebsite/catalog/includes/modules/ezier_new_fields.php on line 24

 

Any idea what could be wrong?

 

I did step 1-7 as described.

 

Thanks again!

Link to comment
Share on other sites

Thanks that'll do.

 

Now I've installed the contribution in my shop and I get the following error on the product_info.php page:

 

Fatal error: Call to undefined function: osc_ez() in /home/www/ww7541/html/mywebsite/catalog/includes/modules/ezier_new_fields.php on line 24

 

Any idea what could be wrong?

 

I did step 1-7 as described.

 

Thanks again!

Check step 7 again. The error referrs to a function added at the end of general.php.

 

catalog/includes/functions/general.php

ADD (At the very end, before the last ?>):


// EZier New Fields 5.0 decimal replacer (Noel Latsha)
function osc_ez($number) {
$strlen = strlen($number);
if (NEW_FIELDS_DECIMAL == 0) { ($strlen = ($strlen - 3)); } // Set the decimal places
if (NEW_FIELDS_DECIMAL == 1) { ($strlen = ($strlen - 1)); } // We don't need em here
$number = substr($number, 0, $strlen);
return $number;
}

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

 

Replace that and you're fine...

Link to comment
Share on other sites

;)  Accordingly to Sharkie a "dictionary/go-to-bed alarm" attached to EZfields!  :D

Perhaps I can write some sort of function that logs keyboard errors, head falling on keyboard, jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj

jjjjjjjjjjj, and number of errors created on output.

 

Then a popup would say:

 

Do one of the following:

 

1. Stop drinking and coding, friends don't let friends code drunk.

2. Get some rest or drink some coffee.

3. You have almost reached the error limit for Microsoft Products in one hour (12 million) Please step away from the computer...

 

The spelling threw me off to, so dictionary support will be provided by Google from now on...

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

 

Replace that and you're fine...

Link to comment
Share on other sites

;)? Accordingly to Sharkie a "dictionary/go-to-bed alarm" attached to EZfields!? :D

Perhaps I can write some sort of function that logs keyboard errors, head falling on keyboard, jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj

jjjjjjjjjjj, and number of errors created on output.

 

Then a popup would say:

 

Do one of the following:

 

1. Stop drinking and coding, friends don't let friends code drunk.

2. Get some rest or drink some coffee.

3. You have almost reached the error limit for Microsoft Products in one hour (12 million) Please step away from the computer...

 

The spelling threw me off to, so dictionary support will be provided by Google from now on...

LOL :lol:

Link to comment
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!

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
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!

 

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

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

 

Replace that and you're fine...

Link to comment
Share on other sites

  • 3 weeks later...

Noel, thanks for the great contribution!!

 

I'm sure that I can use this contribution with PayPal IPN contribution by Gregory Baboolal.. But I don't know how to display retail price and my save in featured product box. The featured product box only shows price and product name and its short description..

 

Noel, can you help me with this issue? I'm sure that you tried this contribution.. if I'm correct..

 

In addition to that, do you have any clue how I can add product model number as well?

 

 

Please help me out... Thank you.

 

 

minuteago

Link to comment
Share on other sites

Hi, Fantastic mod,just what I needed. Thanks.

 

However...

 

On my site the default is to display prices with tax included, If I add a product that has the following;

 

Retail price ?625.00

Your Price ?525.00

it calculates the saving as ?85.10

 

It is clearly displaying the ex tax price, I need the saving to be shown including tax, ie ?100.00

 

Iss this something to do with the way I have the catalog set up?

 

The settings are :

Tax decimals = 2

Display prices with tax = true

Ezier new fields display = true

Ezier new fields decimals = 2

Tax is 17.5%

 

any help appreciated!

 

thanks

Link to comment
Share on other sites

Hi, Fantastic mod,just what I needed. Thanks.

 

However...

 

On my site the default is to display prices with tax included, If I add a product that has the following;

 

Retail price ?625.00

Your Price ?525.00

it calculates the saving as ?85.10

 

It is clearly displaying the ex tax price, I need the saving to be shown including tax, ie ?100.00

 

Iss this something to do with the way I have the catalog set up?

 

The settings are :

Tax decimals = 2

Display prices with tax = true

Ezier new fields display = true

Ezier new fields decimals = 2

Tax is 17.5%

 

any help appreciated!

 

thanks

 

I can get you a quick fix, methinks. Do you want the % savings shown, the value shown, or both?

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

 

Replace that and you're fine...

Link to comment
Share on other sites

Flyer5 - I didn't test it, but give this a shot:

 

catalog/includes/modules/ezier_new_fields.php

 

Look For:

// Uncomment the line that you want below, and comment our the default option if you like, description is to the right  

 

Under that you'll see the options for the different display setup, replace all the variables of

$save2

with

$currencies->display_price($save2, '')

 

Give that a shot and let me know if it works...

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

 

Replace that and you're fine...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...