lalelunet Posted October 11, 2005 Posted October 11, 2005 I found some threads about my contribution ShowNewPrice strewn over the forum. So I decide to open an offical support-thread for it where I get noticed about new posts..... The contribution you will find here Quote Greetings Thomas
demofil Posted October 11, 2005 Posted October 11, 2005 Hello! The first of all excuse me for my very very poor english, (I'm spanish, ?where are you from??) I have installed your contributions, I have followed all the steps but I have one error In the small box "TOTAL" I always see "NaN.Na", and it never change I read so this: "You had to set the dezimal seperator to a dot (.) in your currency settings. Then everything should work fine....." but I do this and it ever is wrong very thanks! Quote
lalelunet Posted October 11, 2005 Author Posted October 11, 2005 Hello! The first of all excuse me for my very very poor english, (I'm spanish, ?where are you from??) I have installed your contributions, I have followed all the steps but I have one error In the small box "TOTAL" I always see "NaN.Na", and it never change I read so this: "You had to set the dezimal seperator to a dot (.) in your currency settings. Then everything should work fine....." but I do this and it ever is wrong very thanks! I think I found the mistake. After the last upgrade from ShowNewPrice I forget the people that are using US-Dollar (and other currencies) in their shop....... :rolleyes: Please replace the following line in catalog/product_info.php $tmp_price = preg_replace("/(.+\.\d{2,2})(.+)/","\\1",$tmp_price); with this one. $tmp_price = preg_replace("/[$]*(\d+\.\d+)(.*)/","\\1",$tmp_price); This should hopefully fix the problem. If your problem is fixed please send me a PM or a email to me so that I can upload a fix to oscommerce!!!! Dont worry about your English. I am from Germany and my English is also bad...... Ask the members whose first language is English...... :lol: Quote Greetings Thomas
Guest Posted October 11, 2005 Posted October 11, 2005 I think I found the mistake.After the last upgrade from ShowNewPrice I forget the people that are using US-Dollar (and other currencies) in their shop....... :rolleyes: Please replace the following line in catalog/product_info.php $tmp_price = preg_replace("/(.+\.\d{2,2})(.+)/","\\1",$tmp_price); with this one. $tmp_price = preg_replace("/[$]*(\d+\.\d+)(.*)/","\\1",$tmp_price); This should hopefully fix the problem. If your problem is fixed please send me a PM or a email to me so that I can upload a fix to oscommerce!!!! Dont worry about your English. I am from Germany and my English is also bad...... Ask the members whose first language is English...... :lol: Make sure you change: $tmp_price = preg_replace("/[$]*(\d+\.\d+)(.*)/","\\1", in the hilfe.php file. It now adds the options but does not add the main item price which could be caused by the other contributions I have added in the code. Quote
Guest Posted October 12, 2005 Posted October 12, 2005 Make sure you change: $products_price = preg_replace("/[$]*(\d+\.\d+)(.*)/","\\1",$products_price); in the hilfe.php file. It now adds the options but does not display the "thousands" place (ie x.400.00). I would also like to be able to use the "," instead of the "." (decimal). Please let me know what you find out. This is a great feature if we can get it working! Thanks. Jeff. Quote
lalelunet Posted October 12, 2005 Author Posted October 12, 2005 Make sure you change: $products_price = preg_replace("/[$]*(\d+\.\d+)(.*)/","\\1",$products_price); in the hilfe.php file. It now adds the options but does not display the "thousands" place (ie x.400.00). I would also like to be able to use the "," instead of the "." (decimal). Please let me know what you find out. This is a great feature if we can get it working! Thanks. Jeff. I upload the version v 1.03 This lousy problem with the NAN.NA should be solved...... Now you can use the default currency settings from oscommerce. A comma for the thousands and a dot for decimal (1,123.00) Quote Greetings Thomas
Guest Posted October 12, 2005 Posted October 12, 2005 I upload the version v 1.03This lousy problem with the NAN.NA should be solved...... Now you can use the default currency settings from oscommerce. A comma for the thousands and a dot for decimal (1,123.00) Hi Thomas, Thank you for your update. I am still having a few issues (not sure if it your contribution or my cart): 1. It will only work when I remove the "comma" within the currency settings. If I leave the "comma" within the currency settings, I still get a NaN.Na error. 2. When it does work, the total cost is not transferred when I click on "Add to Cart". Any suggestions? Does the total cost carry over for you? Thanks. Jeff. Quote
lalelunet Posted October 12, 2005 Author Posted October 12, 2005 Hi Thomas, Thank you for your update. I am still having a few issues (not sure if it your contribution or my cart): 1. It will only work when I remove the "comma" within the currency settings. If I leave the "comma" within the currency settings, I still get a NaN.Na error. 2. When it does work, the total cost is not transferred when I click on "Add to Cart". Any suggestions? Does the total cost carry over for you? Thanks. Jeff. I test it again with a new shop. All is working here..... :( I use the default currency settings: comma for thousands and a dot for decimal. After adding to cart the price is taken over too. I test it with euro and dollar. Even the conversation between dollar and euro is working in the shopping cart.... Here you can found a screenshot -> screenshot.png As you can see I add one graphic-card to the shopping-cart and the price includes the options. Take a look at your database. This hack works only with plus values (option xy: + 25.00) In the table products_attributes the field price_prefix should have the plus value.... In the original database this field has no default value. To make shure that a price_prefix is a plus value (if no value is defined at insertion) you can use this sql-order: ALTER TABLE `products_attributes` CHANGE `price_prefix` `price_prefix` CHAR( 1 ) NOT NULL DEFAULT '+' Is anybody out there who can test the ShowNewPrice contribution too? Quote Greetings Thomas
Irin Posted October 12, 2005 Posted October 12, 2005 (edited) Hello, How can I add a $ in front of Total and is this work just with a dropdown menu? What about radio buttons? There is no Total if I use it with radio buttons. Thanks, Irina. Edited October 12, 2005 by Irin Quote
demofil Posted October 13, 2005 Posted October 13, 2005 Hello again, Thank you very much by its aid, now all works fine :D It is a pleasure to see so effective people as you To resolve my error I can to do two changes: 1. Replace in catalog/product_info.php $tmp_price = preg_replace("/(.+\.\d{2,2})(.+)/","\\1",$tmp_price); with this one. $tmp_price = preg_replace("/[$]*(\d+\.\d+)(.*)/","\\1",$tmp_price); 2. In the catalog/hilfe.php file I change the $products_price by this: $products_price = preg_replace("/[$]*(\d+\.\d+)(.*)/","\\1",$products_price);. very many thanks PS: Now I am tryingl that this change does it in I title of I articulate, if with himself dire, thanks again Quote
lalelunet Posted October 13, 2005 Author Posted October 13, 2005 Hello, How can I add a $ in front of Total and is this work just with a dropdown menu? What about radio buttons? There is no Total if I use it with radio buttons. Thanks, Irina. The dollar sign ($) in front of the total price is not possible. You can include it in front of the total field by just adding it in the echo order in hilfe.php echo '<p align=center>TOTAL: $<input class=Feld type="text" name="OrderTotal" size="10"></p><br>'; I never see a shop with radio buttons..... To do this you had to edit the function tep_draw_pull_down_menu_price_update in the file catalog/includes/functions/html_output.php but in the moment I can not visualize how this should be working...... Quote Greetings Thomas
Irin Posted October 13, 2005 Posted October 13, 2005 The dollar sign ($) in front of the total price is not possible. You can include it in front of the total field by just adding it in the echo order in hilfe.phpecho '<p align=center>TOTAL: $<input class=Feld type="text" name="OrderTotal" size="10"></p><br>'; I never see a shop with radio buttons..... To do this you had to edit the function tep_draw_pull_down_menu_price_update in the file catalog/includes/functions/html_output.php but in the moment I can not visualize how this should be working...... Thanks for your reply, lalelunet. Unfortunately, adding $ in front of the total is not gonna work for me, because I have some other currencies in my store, so it not always $. The radio buttons I was talking about, came from an additional contibution, don't remember which one though. I have dropdown menu, radio buttons, text, etc. options. The problem I have now is, in my store I use both attributes with "-" as well as with "+" values. With "+" this contribution works fine but not with "-". Instead of subtracting from the total, it's adding more. Is it anyway I can stop it from adding where it not suppose to be added? May be just prevent this Total from showing up on this pages at all... I'll appreciate any suggestions. Thanks, Irina. Quote
lalelunet Posted October 14, 2005 Author Posted October 14, 2005 Thanks for your reply, lalelunet. Unfortunately, adding $ in front of the total is not gonna work for me, because I have some other currencies in my store, so it not always $. The radio buttons I was talking about, came from an additional contibution, don't remember which one though. I have dropdown menu, radio buttons, text, etc. options. The problem I have now is, in my store I use both attributes with "-" as well as with "+" values. With "+" this contribution works fine but not with "-". Instead of subtracting from the total, it's adding more. Is it anyway I can stop it from adding where it not suppose to be added? May be just prevent this Total from showing up on this pages at all... I'll appreciate any suggestions. Thanks, Irina. To print out the currency symbol you can use this line echo '<p align=center>TOTAL: '.$currencies->currencies[$currency]['symbol_left'].'<input class=Feld type="text" name="OrderTotal" size="10">'.$currencies->currencies[$currency]['symbol_right'].'</p><br>'; in your hilfe.php instead of echo '<p align=center>TOTAL: <input class=Feld type="text" name="OrderTotal" size="10"></p><br>'; The SNP distribution works only with plus values. To get it working with '-' is more than a little job. My free time is in the moment very rare so I am not able and (sorry) not interrested to do this. The only way is to change the prices into plus values. Product option 1 default +0 Product option 2 +1.00 Product option 3 +3.00 Product option 4 +5.00 Quote Greetings Thomas
sbreuer Posted October 15, 2005 Posted October 15, 2005 Hi Thomas, i have now updated the contribution to Version 1.03 but i still get NaN.Na as result. Decimal Seperator is "." and Thousand Seperator is "," Do you have any suggestions? Best Regards Stefan Quote
lalelunet Posted October 17, 2005 Author Posted October 17, 2005 Hi Thomas, i have now updated the contribution to Version 1.03 but i still get NaN.Na as result. Decimal Seperator is "." and Thousand Seperator is "," Do you have any suggestions? Best Regards Stefan Can you send me your product_info.php, hilfe.php and brechner.js? Then I will take a look... Is this a new installation from oscommerce or a already running shop with one or more changes(contributions)? Do you have a link to this shop? Quote Greetings Thomas
WEB11 Posted October 23, 2005 Posted October 23, 2005 Hey Thomas, For starts I would like to thank you for this great contrib, it's just what I was looking for :D. I got a couple of questions for you, is there a way to align the total box and text to the left just under the attribute menus? I also would like to make the TOTAL text bold and shrink the box to about 1/4 of the current size. Thanks in advance! Quote
WEB11 Posted October 23, 2005 Posted October 23, 2005 (edited) So far I managed to shrink the size of the total box and to make the total price inside the box bold by modifying styless.css. I still need to align everything to the left and make the TOTAL text bold. It would be nice to shrink the font if I could as well. Edited October 23, 2005 by WEB11 Quote
lalelunet Posted October 23, 2005 Author Posted October 23, 2005 So far I managed to shrink the size of the total box and to make the total price inside the box bold by modifying styless.css. I still need to align everything to the left and make the TOTAL text bold. It would be nice to shrink the font if I could as well. Just edit this line in hilfe.php echo '<p align=center>TOTAL: <input class=Feld type="text" name="OrderTotal" size="10"></p><br>'; Here is a example: echo '<p align=left><font size=-2>TOTAL:</font> <input class=Feld type="text" name="OrderTotal" size="10"></p><br>'; Quote Greetings Thomas
WEB11 Posted October 24, 2005 Posted October 24, 2005 Thanks for the tip! Is there any chance of a future version that will account the negative price attributes? Sometimes we want to offer the more expensive options as default but let the costumer choose if he wants to downgrade. Quote
WEB11 Posted October 24, 2005 Posted October 24, 2005 So I got a new problem, I just installed STS and love it, but this mod stoped working :(. Is there anyone that mannaged to install this under STS? I dont wanna have to choose between this mod and STS. :o Quote
jonw118 Posted November 18, 2005 Posted November 18, 2005 So I got a new problem, I just installed STS and love it, but this mod stoped working :(. Is there anyone that mannaged to install this under STS? I dont wanna have to choose between this mod and STS. :o For what's it worth, I just added it using STS, no prob (yet- fingers crossed) Quote
sbreuer Posted December 1, 2005 Posted December 1, 2005 For what's it worth, I just added it using STS, no prob (yet- fingers crossed) Hi Jon, can you please tell me which files you added to get it running for STS? Thanks for your help Best Regards Stefan Quote
custombytes Posted December 9, 2005 Posted December 9, 2005 I'm having this problem as well, is there any chance you could check my files and ensure I did this correctly? I've tried it twice and had the same problem both times. Thanks! I think I found the mistake.After the last upgrade from ShowNewPrice I forget the people that are using US-Dollar (and other currencies) in their shop....... :rolleyes: Please replace the following line in catalog/product_info.php $tmp_price = preg_replace("/(.+\.\d{2,2})(.+)/","\\1",$tmp_price); with this one. $tmp_price = preg_replace("/[$]*(\d+\.\d+)(.*)/","\\1",$tmp_price); This should hopefully fix the problem. If your problem is fixed please send me a PM or a email to me so that I can upload a fix to oscommerce!!!! Dont worry about your English. I am from Germany and my English is also bad...... Ask the members whose first language is English...... :lol: Quote
rafraf Posted April 19, 2006 Posted April 19, 2006 Hi the ShowNewPrice contribution works great but only when the initial price of the product is less than $1000. When the inital price is higher I get the NaN.Na thing. What can I do?? Thanks! Quote
lalelunet Posted April 23, 2006 Author Posted April 23, 2006 Hi the ShowNewPrice contribution works great but only when the initial price of the product is less than $1000. When the inital price is higher I get the NaN.Na thing.What can I do?? Thanks! I upload a new version from SNP (1.05) This should fix your problem and the shop is able to display prices greater than 999.999.99 Greetings to Venezuela.... Quote Greetings Thomas
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.