Dirty Butter Posted May 31, 2016 Share Posted May 31, 2016 I tried picking up this code from dashboard.index.php for the product total, but wasn't overly surprised when it didn't work - it was worth a try lol. <dt>{$LANG.dashboard.inv_products}</dt> <dd>{$COUNT.products}</dd> I'm assuming I would need a script to get today's date, and there is bound to be some way to get the total on the store front. Anyone able to help with this? My reason for wanting this is that there are many small toy stores online that seem to be active, but when you actually try to buy from them - they aren't working. They've just been left online dead as a door nail. We occasionally gets emails from potential customers wanting to know if our store is active or not. I realize displaying today's date isn't going to be enough, but it might help to allay fears. And I'm proud to advertise the number of items we have listed, which increases almost every day. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 31, 2016 Share Posted May 31, 2016 Wherever you want the date to display, add this to the template: {$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'} Supposedly, $smarty is a valid variable. It just isn't found as being used in a template as far as I can tell. I think there is a small plugin or patch that shows the number of inventory. I've seen this for CC5. This might be interesting: http://www.cubecartforums.org/index.php?showtopic=18110 Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 31, 2016 Share Posted May 31, 2016 I think a much more illuminating indicator that will show your store is actively manned and engaged in business activities is to use the Product's "Date Updated" property. If this date is recent, and is shown on, especially, the Latest Products page and the product's View Details page, then it is reasonable for the customer to assume the store management is actively pursuing new inventory. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 31, 2016 Author Share Posted May 31, 2016 You're right - the Updated property probably would be more revealing, but would be helpful in our situation only for the Homepage. We do have many product listings that we sell over and over that were originally listed as far back as 2008. Maybe both? The Products listed as of date on all pages AND the updated date on each item on Latest Products? Quote Link to comment Share on other sites More sharing options...
ayz1 Posted May 31, 2016 Share Posted May 31, 2016 Would putting something like Website Updated: 31/05/2016 11:31am on the homepage then update at regular intervals be sufficient? Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 31, 2016 Share Posted May 31, 2016 Manually updating at regular intervals might be an onerous management task. And certainly I suggest not having some automated process do it - even though the outward appearance would be no different than a legitimately updated product. So, I think we have a solution for the Homepage Latest Products. Are we still brainstorming a solution for some other page? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 31, 2016 Author Share Posted May 31, 2016 Showing updated by each product should only be for Homepage for MY needs. I downloaded and installed Noodleman's plugin, but the hooks are not showing up. When I tried to enable the plugin it would not accept the check mark. The Date Smarty code worked just fine. I'll have to decide if I want it all the way down to the second, but is definitely working correctly. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 31, 2016 Share Posted May 31, 2016 Not having confirmed anything, I was afraid this might happen: that plugin is not recent which means the version of ionCube it is encoded with may not match the version of ionCube installed on your system. I don't know. (As an aside: I was incredibly disappointed with that plugin being as "freebeer" but not "freedom".) Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 31, 2016 Author Share Posted May 31, 2016 That plugin requires ioncube. Where would I look to be sure it is still installed? Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 31, 2016 Share Posted May 31, 2016 To make sure ionCube is installed, in admin, PHP Info, the top block of info, at the bottom, will show all the added stuff that affects PHP: "...with ionCube Loader vx.y.z" Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 31, 2016 Author Share Posted May 31, 2016 OK I had found that. So it's because it's for v5. And the hooks is obfuscated. It's not in Base64. Why do that for a free plugin??? Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 31, 2016 Share Posted May 31, 2016 Not necessarily because it is for CC5. Find PHP's error_log and see if there is any log entry mentioning ionCube incompatibilities. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 31, 2016 Author Share Posted May 31, 2016 No debug or error messages regarding ioncube. Is there some other way I can check? Something I can install that you know will only work if ioncube loader is working properly? I made the code active on the front page, even though it is not enabled in plugins, just to see what error message pops up. Quote [31-May-2016 15:39:04 UTC] PHP Warning: Security Warning: Illegal array key "$Path" was detected and was removed. in /home/butter01/public_html/plushcatalog/classes/sanitize.class.php on line 72 [31-May-2016 15:39:04 UTC] PHP Warning: Security Warning: Illegal array key "$Domain" was detected and was removed. in /home/butter01/public_html/plushcatalog/classes/sanitize.class.php on line 72 I suppose that's to be expected, as sanitize hasn't been told what the {$TOTAL_ENABLED_PRODUCTS} refers to. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 31, 2016 Share Posted May 31, 2016 I would think PHP itself would complain if the ionCube Loader was not functioning, considering it does get listed in the PHP Info box. A stupid suggestion for a means to check would be to install a copy of CubeCart 5 (a version that still implements a license check). Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 31, 2016 Author Share Posted May 31, 2016 I have orders to mail and that will take a bit of time. Will table this until later today. I would like to show the date installed for each listing in Latest Products. Could you suggest code for that now? Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 31, 2016 Share Posted May 31, 2016 A basic implementation would be: In the template content.homepage.php, near the bottom, find: <input type="hidden" name="add" value="{$product.product_id}"> On a new blank line ABOVE that, add: <div class="row collapse marg-top"> <div class="small-12 columns text-right"> Acquired: {$product.date_added} </div> </div> Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 31, 2016 Author Share Posted May 31, 2016 Right now I have this on homepage.php: {elseif $product.ctrl_stock && !$CATALOGUE_MODE} <div class="row collapse marg-top"> <div class="small-12 columns "> <a href="{$product.url}" title="{$product.name}" class="button small postfix">{$LANG.common.info}</a> <h4>Added {formatTime(strtotime($product.updated))}</h4> </div> There's probably a much better way to do it , but it helps. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 31, 2016 Share Posted May 31, 2016 The following (if PHP is allowed to display errors) will be shown if ionCube is missing, inoperative, or (slightly different wording for) wrong version: Site error: the file /modules/plugins/Homepage_Counts_v1.0.0/admin/index.inc.php requires the ionCube PHP Loader ioncube_loader_win_5.4.dll to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 31, 2016 Author Share Posted May 31, 2016 Not seeing THAT. I can't get the Homepage Counts plugin enabled to even get that far to have the error message. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 31, 2016 Share Posted May 31, 2016 I am researching as we speak why CC6 will not allow me to enable the module from the Manage Plugins list. For some reason, the checkbox is being denied the ability to be checked. My initial impression is that CC6011 (maybe earlier) has actually incorporated a check against the declared version compatibility in the module's config.xml file. Nope. Makes no difference. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 31, 2016 Author Share Posted May 31, 2016 Tried changing config.xml on the plugin to 6.0 - cleared all cache - still won't enable. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 31, 2016 Share Posted May 31, 2016 Make sure the name of the folder does NOT include any periods. This interferes with CSS and javascript (which uses periods in special ways). Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 31, 2016 Author Share Posted May 31, 2016 THAT WAS IT! Working! Take a look at https://dirtybutter.com/plushcatalog and see what you think. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 1, 2016 Author Share Posted June 1, 2016 My custom language phrases quit working. I've repaired the CubeCart_lang_strings table, just in case, but the custom strings that are being stored there are not currently being used. I'm not sure how long that's been the case. But since this plugin was a v5, I decided to try disabling it before any further attempts to find the issue. Sure enough, when I disabled the homepage_count plugin, my custom language phrases returned! I certainly didn't expect THAT!! Quote Link to comment Share on other sites More sharing options...
Noodleman Posted June 8, 2016 Share Posted June 8, 2016 Morning, I see you are chatting about one of my free modules. I am not entirely sure why there have been so many issues with the module. I tested it today using V6 and it worked OK. so perhaps there was some issue with the encoding of the module. Since this is a free module, no reason to encode it. It doesn't have any license requirements. I've replaced the encoded files with standard files so if you re-download the module you can modify it as required. It's quite an old module, but also very simple so should just work. Also, no idea why it would break the languages. Very strange. perhaps try creating an XML file in the languages directory of the module that matches the default language of your store. In CC6 it should create them, but perhaps it didn't. It's not the most graceful of code. This module was put together when I was starting to learn the CC hooks/plugin structures. 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.