Jump to content
Latest News: (loading..)

Recommended Posts

Hi Tsimi,

 

installed the addon and when i click to apply discount i get the following error message 

 

2016-08-05 00:00:00
Warning: Cannot modify header information - headers already sent by (output started at /home/MYSITE/public_html/admin/specials.php:368) in/home/MYSITE/public_html/admin/includes/functions/general.php on line 75

 

when i click back to go back to the specials page the discounts have been applied without and are showing up on the front end.

just wondered if you had any idea of what might be causing this error when the apply discount button is clicked

 

thanks

Neil 

Share this post


Link to post
Share on other sites

@@dnbvinyl

 

Hi Neil

 

Not sure why it is happening. Maybe white space after or before the <?php or ?> tag?

 

http://forums.oscommerce.com/topic/268790-warning-cannot-modify-header-information-headers-already-sent-by/

 

Do you have more info like what oscommerce version you are using.

Edited by Tsimi

Share this post


Link to post
Share on other sites

Hello Tsimi

In admin/specials.php it shows the specials with a thousands separator

So what happens is If you for example just enable the special it defaults to price = 1

I found that the thousands_point seems to be a problem ie, 1,243.56

So if you enter the special price as 1234.56 and then update its ok, but not with the ,

I tried changing below and finding a solution, pls help 

<td width="15%" class="dataTableContent" align="center"><input name="discount" style="border:1px solid #ccc;text-align:right" type="text" size="8" value="<?php echo number_format(tep_add_tax($specials['specials_new_products_price'], $tax_rate),intval($currencies->currencies[DEFAULT_CURRENCY]["decimal_places"]), $currencies->currencies[DEFAULT_CURRENCY]["decimal_point"], $currencies->currencies[DEFAULT_CURRENCY]["thousands_point"]);?>"/> <?php echo $percent_select; ?></td>
<td width="8%" class="dataTableContent" align="center"><?php if($specials['specials_new_products_price']){echo number_format(-1*($specials['products_price'] - $specials['specials_new_products_price'])*100/$specials['products_price'], intval($currencies->currencies[DEFAULT_CURRENCY]["decimal_places"]), $currencies->currencies[DEFAULT_CURRENCY]["decimal_point"], $currencies->currencies[DEFAULT_CURRENCY]["thousands_point"]).'%';}else{ echo '---';} ?></td>

 


Thanks to all source contributors, 2.3.4 Edge just works fine

https://github.com/gburton/Responsive-osCommerce/archive/master.zip

Share this post


Link to post
Share on other sites
On 8/5/2016 at 9:18 AM, dnbvinyl said:

 

output started at /home/MYSITE/public_html/admin/specials.php:368)

Look at /admin/specials.php. Is line 368 the last line? There is probably a blank or empty line after the last ?>, causing text to be sent to the browser "too early", before all the header information has been updated. Did you manually edit this file at some point, and maybe left a blank line? Edit the file manually, being careful not to leave an extra line (note: it may not be visible to you in the browser!), and save it. Try using it again and see if the problem has gone away.


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozen or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

@Peper

Just tested and you are right if I type a special price with 1,200 then it doesn't work but if you just type 1200 it works just fine.
Once the price is entered it shows as 1,200 so all good right? Just type the price without the , and you are good.

Share this post


Link to post
Share on other sites
15 hours ago, Tsimi said:

@Peper

Just tested and you are right if I type a special price with 1,200 then it doesn't work but if you just type 1200 it works just fine.
Once the price is entered it shows as 1,200 so all good right? Just type the price without the , and you are good.

It does not seem that classes/currencies is responsible for that , 

Any way to remove that thousands , entirely in specials?


Thanks to all source contributors, 2.3.4 Edge just works fine

https://github.com/gburton/Responsive-osCommerce/archive/master.zip

Share this post


Link to post
Share on other sites
On 8/9/2017 at 8:21 AM, Tsimi said:

@Peper

Ah! So you don't want that , ?

Thanks Tsimi

I have sorted this out with ""

<?php echo number_format(tep_add_tax($specials['specials_new_products_price'], $tax_rate),intval($currencies->currencies[DEFAULT_CURRENCY]["decimal_places"]), $currencies->currencies[DEFAULT_CURRENCY]["decimal_point"], "");?>"/> <?php echo $percent_select; ?></td>

 


Thanks to all source contributors, 2.3.4 Edge just works fine

https://github.com/gburton/Responsive-osCommerce/archive/master.zip

Share this post


Link to post
Share on other sites

Hi @Tsimi ,

on line 368 of specials.php   echo $start_date; is the reason for the headers already sent error.

Seems to be a left over for testing purpose?

And another question: I'd like to be able have a filter which is showing/editing only products that have no special price yet just the opposite to show only specials, could be useful for a global time limited discount on all products excluding the products that have special prices already.

Best regards

Christoph

 

 

Share this post


Link to post
Share on other sites

Can someone PLEASE get this contribution written to work with 2.3.4.1 CE?

This is a PRICELESS addition to the administrative side of the website.  I installed the newest version of it this morning and...no luck.

I've had it for years in my old 2.2 site and it works perfectly.  For anyone that has thousands of items in their site, this is almost a necessity to have.

It allows you to select a category...or a category and all of its subcategories at once...and apply a specials price to all items in one click. 

At present?  I have to manually find each item and assign a specials price...ONE - AT - A - TIME.

It's a nightmare!

Share this post


Link to post
Share on other sites
7 hours ago, puggybelle said:

Can someone PLEASE get this contribution written to work with 2.3.4.1 CE?

https://apps.oscommerce.com/Gsxm9&advanced-special-offers-and-discounts-fo

Let me know if you have any problems.


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

Thank You so very much!  I installed it a short time ago and all is well.  2.3.4.1 CE with PHP 7.0

This contribution is invaluable to shop owners who have hundreds or thousands of products.  A huge timesaver.

It really should be incorporated into the stock install of osCommerce.

Thanks again!

- Andrea

Share this post


Link to post
Share on other sites

I just installed this add on to set up some Black Friday specials and noticed that the "echo $start_date;" statement on line 368 hasn't yet been removed from the file specials.php.  The echo is printed on a blank page so you're left with the impression that the add-on doesn't work.   I thought I'd post about this for anyone else who is struggling to get the add on to work...just remove or comment out line 368 and it's all good.

Dan

Share this post


Link to post
Share on other sites

Just wanted to chime in about this add on again. 

A lot of the products we sell are MAPPed items, so specials are often controlled by the manufacturers, and vary in both the amount and duration a promotional discount can be offered.  In the past, this has required a lot of time and effort to set up and manage properly, given the number of products we offer.   We used Advanced Specials to manage this process for Black Friday and it made the whole process a breeze.  We could even set the specials up, days in advance, and they were just applied to the products automatically when the time arrived.  If you find yourself in a similar situation, with lots of specials to manage, I would highly recommend this add-on.  From a design point of view the add-on could use some work but once your figure out how things are intended to work, it is a real time saver.

A big well done to all those who had a hand in the development of this add-on over the years.  It saved us a ton of time already and should allow us to offer other specials throughout the year, many of which we've not bothered with in the past, because of the work involved.

THANK YOU.

Dan

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

×