mondobongo3 Posted May 31, 2010 Posted May 31, 2010 I use Easy Specials and when I try to appy % discount, i receive this error: An appropriate representation of the requested resource /admin/specials.php could not be found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Is the "%' not supported? And if not, how I apply discount in percents ? Regards, Andrei. Quote
Cocaberry Posted June 2, 2010 Posted June 2, 2010 I am having the same problem. I am using easy advanced specials admin v1.3.2. Maybe someone has a fix for this? Quote
eugeniobonifacio Posted June 4, 2010 Posted June 4, 2010 Hi, can you post here the URL shown in the browser when this happens? This could be a problem caused by mod_rewrite. Are you sure it happens only when applying percentage discount? Do you mean overall or single row discount applying? Let me know about all this. Bye Eugenio Quote
Cocaberry Posted June 4, 2010 Posted June 4, 2010 URL when this happens is: https://www.mystore.com/admin/specials.php?action=update_all&product_name=&cPath=&manufacturer_id=&sort=product_id&sort_type=asc&flag=&discount=50%25&date=&x=62&y=9 That is when I try to apply a 50% discount to all products in catalog (3 so far, just for testing). I typed in 50% in the "Discount (Currency or %):" field and clicked "Apply Discount." If I type in 50 without the percentage sign, the price of all items is set to $50. Quote
eugeniobonifacio Posted June 5, 2010 Posted June 5, 2010 I checked the script and tested it: I cannot reproduce the error you get. In general the 404 error lets me think that it should be a problem caused by your server settings, for example mod_rewrite, or some page authorization script in your osCommerce. There are scripts that help manage access to admin pages, these could cause this kind of problem. Next step should be allowing me direct access to your store. Let me know. Eugenio Quote
Cocaberry Posted June 5, 2010 Posted June 5, 2010 I don't think I'll be able to let you have access to my store but I do have an idea. Maybe the script can be modified so that there are 2 radio buttons or just a drop down box where the user can select either "currency" or "percent" for the type of discount. Then only the number can be typed in the input field. Obviously there is a problem with passing the percent sign itself through the script. Quote
eugeniobonifacio Posted June 6, 2010 Posted June 6, 2010 (edited) Let's try this. Go to line 157 in specials.php, or find the following line: if(preg_match("/^(.*)%$/", $discount)) and change it to if(preg_match("/^(.*)(%|p)$/", $discount)) now you are able to pass a percentual discount either with percent "%" or "p" character. So you can apply a percentual discount of 10% in the form "10%" or "10p". Let me know. Eugenio Edited June 6, 2010 by eugeniobonifacio Quote
Cocaberry Posted June 6, 2010 Posted June 6, 2010 Ok, for a 15% discount, typing in 15p works good but typing in 15% still gives the same error. Quote
eugeniobonifacio Posted June 6, 2010 Posted June 6, 2010 I'm making some changes. Can you check if the same happens with single product discounting (in the product list)? I think it should be the same, but I need a confirm. Eugenio Quote
Cocaberry Posted June 6, 2010 Posted June 6, 2010 Yes, same thing with single product discounting. Quote
eugeniobonifacio Posted June 7, 2010 Posted June 7, 2010 v1.3.3 has been released. Get it here. Let me know. Eugenio Quote
Juto Posted December 28, 2011 Posted December 28, 2011 Hi Eguenio! Thanks for this contribution. I have been testing it and fixed some coding errors. Still, there are bugs to fix: When the prices are set back to discount: the prices shown are the normal prices with a strike through and the normal price in red. Since there are no discount, the prices should be shown the normal way. Since my site is not live yet, I would be happy to pm you my "corrected" code. Please notify me by mail Sara Quote Contributions: http://addons.oscommerce.com/info/8010 http://addons.oscommerce.com/info/8204 http://addons.oscommerce.com/info/8681
Juto Posted December 28, 2011 Posted December 28, 2011 (edited) Hi! I have found yet another bug: foreach($fields as $k => $v) { $set_fields[] = "$k = '$v'"; // PHP Fatal error: [] operator not supported for strings $set_fields = implode(', ', $set_fields); tep_db_query("UPDATE " . TABLE_SPECIALS . " SET $set_fields WHERE products_id = '$product_id'"); } Is there a fix, please? Sara Edited December 28, 2011 by Juto Quote Contributions: http://addons.oscommerce.com/info/8010 http://addons.oscommerce.com/info/8204 http://addons.oscommerce.com/info/8681
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.