Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

  • 1 year later...

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 

Link to comment
Share on other sites

@@dnbvinyl

 

Hi Neil

 

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

 

http://www.oscommerce.com/forums/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
Link to comment
Share on other sites

  • 1 year later...

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>

 

Getting the Phoenix off the ground

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

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

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

Getting the Phoenix off the ground

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

 

Getting the Phoenix off the ground

Link to comment
Share on other sites

  • 3 months later...

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

 

 

Link to comment
Share on other sites

  • 6 months later...

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!

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

Link to comment
Share on other sites

  • 5 months later...

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

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

Link to comment
Share on other sites

  • 5 months later...

I've been using Advanced Specials for many years.  It's an invaluable tool. 

Back in the day with 2.2 and now with 2.3.4.1 CE

Is there any way to add a field or a column that shows whether or not the item is in stock?

I'd like to have the ability to select items to put on special only if they're currently in stock.  Or to be able to see, on that page...admin/specials.php...if the item is in stock or not.

At present, I do it the hard way.  Either checking quantity on another page in my website or physically checking inventory on hand.  A lot of back and forth.

I know there's not much room on the page for a new column, but I'd happily sacrifice the Model Number field (don't use that) in exchange for a column that displays the quantity on hand for each item...zero, 1, 2, etc.

It would make selecting items to put on Special much easier.  I display all items in my site, in and out of stock, and it looks tacky having sale prices on items that are not available.  So...can this be done?

Thank You!

- Andrea

Link to comment
Share on other sites

Started playing and figured out what to do.  :)

If anyone is interested, I simply replaced all instances of the word model with the word quantity in admin/specials.php

Then I added a new entry in admin/includes/languages/english/specials.php to define the quantity heading

define('SPECIALS_ENHANCED_TH_QUANTITY','Quantity');

I put that below the entry for Model in case I ever want to go back and use it in the future.  Now Advanced Specials looks like this:

specials.thumb.PNG.3c0675f2e45669f6f263f63b546031e8.PNG

Clicking around everything seems fine.  If anyone thinks there might be conflict, please reply!

- Andrea

Link to comment
Share on other sites

  • 1 year later...

I have been using this addon for years as it make adding special products so easy. It works fine on my old site but as I am now updating to Phoenix 1.0.7.7. has anyone gor this working on that new a version. I am struggling trying to change al lthe table stuff to something a bit better.

REMEMBER BACKUP, BACKUP AND BACKUP

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...