We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26870
    • 10 Posts
    I am new to modx and I jumped in on development of a site that was unfinished. I am currently trying to hookup the cart to the page. I am unable to add products to the cart with the ’Add to cart’ link that I added to the content portion of my page. While looking over the error log I found the error in the title of the post. What I need to know how to do is, set the cart up to be able to add items and view the cart. I read the docs on the site for setting it up and its all according to plan. Help is most welcomed,



    Shadow
      • 20413
      • 2,877 Posts
      Maybe Terry’s notes can help! smiley

      See attached doc!
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 26870
        • 10 Posts
        I have already tried that, but thank you anyway smiley I have the information for the pages showing up. That was done by the previous maintainer. Its just that the cart does not work, I can click the ’Add to cart’ link and it doesn’t do anything. I also noticed that the ’In Cart’ type thing that the previous maintainer had put up (like amazon that shows the total in the cart) does not work either. Its like cart.amount is not registering anything which would stem back to the add to cart link not working. Unfortunately I dont have access to the server or I would just reinstall everything. Any other suggestions (I am going to ’reinstall’ with what I have, reconfigure the docs one more time)?



        Shadow
          • 30552
          • 75 Posts
          I don’t see anything in the actual posts about the error in the topic name, but I’ll copy my response from another thread:

          To anyone who might still have this error - Undefined index: treasure

          As noted before, it doesn’t seem to affect any functionality; it just throws the error every time you launch the TreasureChest module from within the modx manager.

          I am not a PHP programmer, but I looked at the module code for anything named "treasure" that might be causing the error. Among the first few lines of code was this:
          $action = $_REQUEST['treasure'];


          I looked at all the cases, and thought that maybe when you first execute the module, no cases match, so treasure might be empty (not really empty so much as non-existent), and that’s what’s returning the Undefined index: treasure error.

          I consulted my business partner, Brandon, for a quick fix (he is a PHP programmer), and he said to just replace the line
          $action = $_REQUEST['treasure'];
          with
          $action = (isset($_REQUEST['treasure'])) ? $_REQUEST['treasure'] : '';
          which will not affect the way the module works at all... it will just make it not access $_REQUEST[’treasure’] if there isn’t anything there. That keeps the error from happening, and keeps your modx system events log from filling up with this error.

          Kevin
          TransEffect LLC