Jump to content

Yarnell

Member
  • Posts

    49
  • Joined

  • Last visited

Everything posted by Yarnell

  1. Yeah, the chart has the option to switch between visitors and customers. I used the customer_id field to limit to customers only.
  2. 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.
  3. 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?
  4. 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.
  5. Database::getInstance()->delete('CubeCart_sessions', array('location' >= 2022), false); Hey all, How do I change the >= 2022 to LIKE %2022%?
  6. 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
  7. 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
  8. 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.
  9. 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.
  10. 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 #?
  11. 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?
  12. 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
  13. ahhh. ok. great... opposite of what I was thinking. thanks
  14. 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.
  15. Great, thanks for the explanation. I will give that a try.
  16. 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.
  17. 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
  18. Hey Brian, yes... I have tried that... no luck... I removed it from bot my htaccess and the cube cart program... still no dice.
  19. 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.
  20. 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.
×
×
  • Create New...