Dirty Butter Posted June 8, 2016 Author Share Posted June 8, 2016 Thanks for getting to this so quickly, @Noodleman ! I really appreciate it. I'll work on it today and see how it goes this time. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 8, 2016 Author Share Posted June 8, 2016 I added the XML language file and now it is working properly! Thank you very much for your time. It may be an old module, but with the folder rename to get the periods out of the name it works perfectly! It must have had something to do with the obfuscation. Thank you Bsmither and Noodleman!! Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 28, 2016 Author Share Posted June 28, 2016 Well, my OCD is kicking in. I Googled and found there is a code - string.Format("{0:n0}", 9876); - that put the comma in the thousands place. Is there some way to use that code (or something else) with {$TOTAL_ENABLED_PRODUCTS} - so the customer sees the number with the expected comma? Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 28, 2016 Share Posted June 28, 2016 Yes. Since the code (lately, anyway, I'll have to fetch it again) is human readable, we can apply PHP's number_format() function to the value that gets assigned to {$TOTAL_ENABLED_PRODUCTS}. Well, the Homepage Count plugin as found on the third-party forum hasn't been updated to be human readable. Nor can I find it in the Marketplace. Quote Link to comment Share on other sites More sharing options...
Noodleman Posted June 29, 2016 Share Posted June 29, 2016 You can downlolad it here: ( Same version, 1.0.0 just decrypted. )https://www.noodleman.co.uk/downloads.html I stopped using the third party forum when the marketplace was launched. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 29, 2016 Author Share Posted June 29, 2016 Thanks for the new download, @Noodleman and I fixed the 'CONFIG' ticks in controller.index.php. I thought I understood what you meant for me to do with the number format, @bsmither but obviously not, as it just shows this on the storefront: number_format(4501) Total Products Listed as of 06/29/2016 Here's what I tried to use: <h4>number_format( {$TOTAL_ENABLED_PRODUCTS} ) Total Products Listed as of {$smarty.now|date_format:'%m/%d/%Y'} </h4> Quote Link to comment Share on other sites More sharing options...
Noodleman Posted June 29, 2016 Share Posted June 29, 2016 You will need to use the number_format function within the PHP files of the module rather than in the store template. See: http://php.net/manual/en/function.number-format.php module file controller.index.php, the last line should be something like: $GLOBALS['smarty']->assign('TOTAL_ENABLED_PRODUCTS',number_format($prod_count)); Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 29, 2016 Author Share Posted June 29, 2016 Thanks!! That looks MUCH better!! Quote Link to comment Share on other sites More sharing options...
jeromecollection Posted November 2, 2016 Share Posted November 2, 2016 hello I try to show total product in my store i put ({$TOTAL_ENABLED_PRODUCTS}) on template and add in controller.index.php, $GLOBALS['smarty']->assign('TOTAL_ENABLED_PRODUCTS',number_format($prod_count)); but only apear number 0 i was nice if i can see how many product i have in each category like category 1 (5) subcat 1 (3) subcat 2 (2) category 2 (10) Total product in the store :15 Thank you Quote Link to comment Share on other sites More sharing options...
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.