We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26401
    • 247 Posts
    I have tried installing treasure chest, but am having some issues.

    It seems that the install didn’t go through properly. I didn’t get any errors, but the table and a snippet got created. I had to put the files in the right folder manually, so that could be causing some of my issues.

    Ok, so here’s where I get a bit lost when it comes to adding a product.
    I’m starting with using a blank template
    The documentation says to use this: [[TreasureChest? &item=`1`]]
    but that shows nothing, so I added a chunk after with the placeholders: [[TreasureChest? &item=`1`]]{{productinfo}}
    And now I get to see a product, but the "Add To Cart" doesn’t do anything. I am assuming this is because the javascript hasn’t loaded. I haven’t found any documentation on how to add this.

    I’ve added the "assets/snippets/treasure_chest/script/treasurechest.js" and the css manually.
    I’m not getting any errors, but the add to cart button still is not doing anything.


    Any ideas what I might be doing wrong?
      • 37099
      • 338 Posts
      Use a blank template for the _basket_ and put in content: [!TreasureChest? &service=`cart`!]

      For the _product_ page use a standard template such as MODxHost and (minimum) input in content:

      [[TreasureChest? &item=`1`]]
      <p><span class="treasure_cart"></span></p>
      [+treasure.add+]

      I think you are having problems because you’ve used a blank template for your product page. Treasure Chest needs to see some html tags so it knows where to insert these: the link to the js file, link to css file and a bit of javascript indicating the document id of the basket.

      Hope that helps
      Mike






        • 26401
        • 247 Posts
        Thanks, I was able to figure it out with your help. I didn’t have a blank template for the cart.

        I don’t remmeber where I got it from, I think it was from the treasurechest site. I removed the js include line, because it would add it the js dynamically, so kept adding 2 products.

        I also added the [*#content*] tag you can see at the end

        I modified the resource to include this only
        [[TreasureChest? &item=`1`]]{{productinfo}}
        but the PHs can be added into the template too.

        so if anyone else is having these issues, maybe this will help smiley