-
Posts
49 -
Joined
-
Last visited
Posts posted by Yarnell
-
-
Yeah, the users online tab. and I put a traffic chart on my dashboard. I will try converting that field to a varchar... see if that makes a difference.
-
2022 was just an example.
I would like to weed out any sessions that I don't need to track.
cron jobs for example. I have a wget command running every 30 mins or so and cubecart creates a new session each time it runs.
So would it be ok for me to just change the field to varchar... it won't effect anything?
-
I noticed that the location field is varbinary.
Is there anyway to match the above code to a varbinary field? I can't seem to get it to work.
-
Database::getInstance()->delete('CubeCart_sessions', array('location' >= 2022), false);
Hey all,
How do I change the >= 2022 to LIKE %2022%?
-
Awesome. I ended up using the following code:
require dirname(__FILE__).DIRECTORY_SEPARATOR.'ini.inc.php'; define('CC_IN_ADMIN', false); include CC_ROOT_DIR.CC_DS.'controllers'.CC_DS.'controller.index.inc.php';
Many thanks Brian
-
Hey all,
I am using the following code in a php script to grab config data and db data, this works perfectly.
require 'ini.inc.php'; define('ADMIN_CP', true); require 'includes/functions.inc.php'; $GLOBALS['cache'] = Cache::getInstance(); $GLOBALS['db'] = Database::getInstance($glob); $GLOBALS['config'] = Config::getInstance($glob); unset($glob); $GLOBALS['config']->merge('config', '', $config_default);
I am having trouble getting user data... when I add:
$GLOBALS['user'] = User::getInstance();
It results in the following error:
[Wed Dec 27 20:19:02.242234 2023] [proxy_fcgi:error] [pid 13504] [client 192.168.0.5:25441] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function load() on null in /XXX/classes/user.class.php:1135\nStack trace:\n#0 /XXX/classes/user.class.php(143): User->_load()\n#1 /XXX/classes/user.class.php(167): User->__construct()\n#2 /XXX/player.php(19): User::getInstance()\n#3 {main}\n thrown in /XXX/classes/user.class.php on line 1135', referer: https://domain.com
Is there a way to get data from the current user instance?
Thanks
--
Yarnell -
If anyone happens to run into this issue I have resolved it by using a bit of javascript.
Html
<div> <a href="javascript:void(0)" onclick="makeChange()">Make Changes</a> </div>
Javascript
<script> function myFunction() { var x = document.getElementById("checkout_register_form"); var y = document.getElementById("register_false_address"); if (x.style.display === "block") { x.style.display = "none"; y.style.display = "block"; } else { x.style.display = "block"; y.style.display = "none"; } } </script>
This snippet will hide the confirmation div and show the registration form.
-
Yes. Once the customer has entered thier address the confirmation page comes up. I'd like to add a link to go back and make changes if needed. I tried using the stage links but its stuck on the confirmation page.
-
Morning,
I can't seem to figure out the following:skins\foundation\templates\content.checkout.confirm.php
<div class="pad-top"><a href="#" class="button small show_address_form"><svg class="icon"><use xlink:href="#icon-reply"></use></svg> {$LANG.form.make_changes}</a></div>
This method works for the foundation skin but not in other skins.
Is there any way to go back and make changes by clicking a link without the #?
-
Awesome. thanks B
-
Hey all,
Quick question.
I have 2 shipping costs, the first item is 12.50 and each additional item is 2.50.
How would I go about setting that up?
-
Sup all,
I just noticed that pagination is not working. I'm not sure if its my custom mods or not.
The page links are generated but the products do not change when i click a page link.I'm using version 6.5.1. Is this a bug or did I mess something up?
Thanks
-
ahhh. ok. great... opposite of what I was thinking. thanks
-
Hey all,
just a quick question.
Is the live_from column in the inventory table the date in which the product goes live?
I see it uses a UNIX_TIMESTAMP() format. How would i make a unix timestamp with php's date function?
thanks.
-
Great, thanks for the explanation. I will give that a try.
-
Hey all,
How do I go about adding a new tab in the settings?
I see there is a hook available in he template but im not sure where "hook_tab_content" is stored.
Thanks.
-
Just in cast to anyone stumbles on this post I did find a solution. In version 6.5.1 you will find the following code
/js/common.js
if (top.location.href!=self.location.href) { top.location = self.location.href; }
I just commented it out like so
/* if (top.location.href!=self.location.href) { top.location = self.location.href; }*/
Happy coding
-
Hey Brian, yes... I have tried that... no luck... I removed it from bot my htaccess and the cube cart program... still no dice.
-
Hey all,
I am trying to load the index file into a frameset that consists of 2 frames but I am unable to do so. It keeps redirecting me to the index file.
I have narrowed it dow to the following pice of code inside the https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js file
bindReady: function() { if (!A) { A = e.Callbacks("once memory"); if (c.readyState === "complete") return setTimeout(e.ready, 1); if (c.addEventListener) c.addEventListener("DOMContentLoaded", B, !1), a.addEventListener("load", e.ready, !1); else if (c.attachEvent) { c.attachEvent("onreadystatechange", B), a.attachEvent("onload", e.ready); var b = !1; try { b = a.frameElement == null } catch (d) {} c.documentElement.doScroll && b && J() } } },
When I comment this piece out I am able to load the index file into the frame... however I loose recapcha and other functionalities.
any way to make this work?
Thanks.
-
Perfect. Thanks
-
Sup all,
Just upgraded one of my domains to v6.5.1 and noticed that there are now scheduled tasks.
Question is: Do I simply setup a wget command to https://domain.com?_g=cron&_m=runSnippets in cron jobs to run the tasks?
Thanks.
Delete records LIKE
in Technical Help
Posted
Yeah, the chart has the option to switch between visitors and customers. I used the customer_id field to limit to customers only.