Jump to content

Yarnell

Member
  • Posts

    49
  • Joined

  • Last visited

Posts posted by Yarnell

  1. 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?

  2. 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

  3. 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.

  4. 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 #?

  5. 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

  6. 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 🙂

  7. 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.

×
×
  • Create New...