Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

POA / Free Call for price


tresseh

Recommended Posts

Posted

Hi people, having read through the forums a lot over the last few days, i can see that there is a lot of help available for osCommerce, which im currently using to put together as part of a larger venture.

 

My client sells a lot of products where the prices fluctuate on a daily basis, and this fluctuation is impossible to replicate, due to many external affecting factors.

 

He wants to be able to enter POA (price on application) as the price, however obviously osCommerce doesnt recognise this and reverts it to ?0.00.

 

I am aware of the contribution Free Call for Price, however this modification is complete overkill for my requirement, and there are many included features that will never be of any use to me, or my client.

 

Is there a way i can extract the function that converts certain inserted prices to text/image (i.e 0.00 gets converted to FREE) and modify this so that any price entered as 0.00 is converted to the text ?POA?

 

I have read through about 150 posts over the past few days on here looking for a simpler answer, however anything similar to my problem has always been solved using Free Call for Price, so i've done my homework!

 

Any help will be gratefully appreciated.

 

Regards,

 

Jay

Regards, Jay.

Posted

If all you need is a price of $0 to read different this is really not a hard modification.

 

I wrote Free Call for Price to give a zillion options, but the theory is there to make it much less of an add-on and just adjust the display price based on seeing the $0 value.

 

I'd need a bit more info from you on what you really want, but it should be easy enough to do without needing a full blown update or add-on like the current Free Call for Price v4.0

Posted

Hey Linda, thanks for the reply. The end result im after is literally what you said, i'd like a price of ?0.00 to read as ?POA instead, thats it! Nothing more! :)

 

If you could help at all, i'd appreciate it greatly, im almost there with what the client needs, this is one of the last hurdles! Perhaps it would be ok for me to email you?

 

Regards,

 

Jay

Regards, Jay.

Posted

Edit /includes/classes/currencies.php

 

At the bottom is a function display

 

Don't put any of these things on special, and you can use:

 

    function display_price($products_price, $products_tax, $quantity = 1) {

     if ( $products_price==0 ) {

       return '?POA';

     } else { 

     return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

     }

   }

 

Note: if you have a special in use for a product that is 0, this code is not taking that into account and you will see the ?POA appear twice on the screen.

Posted

Linda, you are a legend, thank you very much indeed for your help on this, its exactly what i wanted!

 

And i hear you on the specials thing, but if we dont have a price, it cant be a special. If it will be a special, we will have a price for it, so it works out fine!

Regards, Jay.

Posted

Then this routine should be safe for you.

 

The deal with the specials is the routine is technically called twice per price in most places in the code by just passing a price and not a products_id ... there are work arounds for this if need be.

  • 7 months later...
Posted

Hi, errm i just tried this. as this is exactly what i am wanting but get the following error

 

Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /homepages/41/d77589944/htdocs/tim/jjsmods/catalog/includes/classes/currencies.php on line 70



Fatal error: Cannot instantiate non-existent class: currencies in /homepages/41/d77589944/htdocs/tim/jjsmods/catalog/includes/application_top.php on line 250

 

has anyone got any ideas why this is happening? Could do with some help pretty quick as the client wants it finishing for weekend :( Trust me to leave it to last minute :(

 

cheers

 

Tim

ePDQ arrggghhhh!

Posted

It looks like you missed a }. Go back to where you edited the display_price function and make sure that all the } are there.

 

Good luck,

Matt

  • 3 weeks later...
Posted
Edit /includes/classes/currencies.php

 

At the bottom is a function display

 

Don't put any of these things on special, and you can use:

 

    function display_price($products_price, $products_tax, $quantity = 1) {

     if ( $products_price==0 ) {

       return '?POA';

     } else { 

     return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

     }

   }

 

Note: if you have a special in use for a product that is 0, this code is not taking that into account and you will see the ?POA appear twice on the screen.

 

I have tried Call for price and SEC but they are overkill. after much searching this is exactally what i need! I need any price of 0 to display call for price. when i used the above code i get this error

Parse error: parse error in /home/marion/public_html/catalog/includes/classes/currencies.php on line 64

 

Fatal error: Cannot instantiate non-existent class: currencies in /home/marion/public_html/catalog/includes/application_top.php on line 242

 

what could be causing this???

It's a Zoo in Here, Literaly...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...