We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4310
    • 2,310 Posts
    Don’t know if it’s a typo or if it would make a difference but
    [[treasureChest? &item=`6`]]
    Should be
    [[TreasureChest? &item=`6`]]

    Is the page un-cached ?
      • 8345
      • 147 Posts
      Page is not cached now but it didn’t help.

      [[treasureChest? &item=`6`]] <- no typo
        • 29525
        • 388 Posts

        Hi all

        I’ve updated my notes on using TreasureChest for the first time. I’ve added notes my attempt to create a product catalog using ditto and TC.

        Let me know if you see any errors or needed corrections.

        http://www.terrybarthdesign.com/terrys-notes-on-treasure-chest-11_08_08

        Terry
          www.terrybarthdesign.com
          • 4310
          • 2,310 Posts
          Terry - that link goes to your 404 page :’(
            • 29525
            • 388 Posts

            Oh Man!! Sorry guys. . . embarrassed

            Try it now.
              www.terrybarthdesign.com
              • 8345
              • 147 Posts
              I don’t know what to do next. No way to get one product listed [[treasureChest? &item=`6`]] - it will keep showing me all the products. I tried cached and uncached.

              Actually in the very beginning when the Treasure Chest was installed then it worked but I don’t know what I did that it doesn’t work any more.
                • 7508
                • 22 Posts
                Hi e-stonia,

                Does the code below display some of the product info?

                [[TreasureChest? &item=`6`]]
                <div class="product-wrap">
                     <div class="product-info">
                         <span class="pagetitle">[+treasure.item_name+]</span><br />
                         <span class="longtitle">[*#longtitle*]</span>
                         <p>[*#description*]</p>
                         <h4 class="product-ingredients">Information</h4>
                         [+introtext+]
                         <h4 class="product-price">Price</h4>
                         <p class="product-price">£ [+treasure.amount+]</p>
                         <h4 class="product-inventory">Inventory</h4>
                         <p class="product-inventory">[+treasure.inventory+] units available</p>
                         [*buynowbut*]
                     <br class="clear" />
                </div>
                </div>
                  • 7508
                  • 22 Posts
                  Hi guys,

                  My Javascript is none-existent can you help with this please?

                  I believe the code below is the TC javascript, I just want to adapt it so it goes to another page or displays some text when the user clicks to view the cart when it is empty, it currently displays an empty page.

                  You can see what i mean at http://121photo.co.uk/index.php?id=54

                  function emptyCart() {
                      $.post(cart_doc, {
                          action: 'count'
                      },
                      function(a) {
                          cart_count = eval("(" + a + ")");
                          if (!cart_count.length) {
                              tb_remove();
                              $(cart_el).animate({
                                  opacity: '1.0'
                              },
                              'slow',
                              function() {
                                  $(cart_el).html('')
                              });
                              return false
                          } else {
                              if (confirm(cart_warn)) {
                                  $.post(cart_doc, {
                                      action: 'empty'
                                  });
                                  $(cart_el).animate({
                                      opacity: '1.0'
                                  },
                                  'slow',
                                  function() {
                                      $(cart_el).html('')
                                  })
                              }
                          }
                      });
                      return false
                  }
                  function checkout(a) {
                      TB_remove();
                      jQuery('#treasureChestCheckout').remove();
                      jQuery('<div id="treasureChestCheckout">' + a + '</div>').appendTo('body').hide();
                      document.paypal.submit()
                  }
                  function cartCount() {
                      $.post(cart_doc, {
                          action: 'count'
                      },
                      function(a) {
                          cart_count = eval("(" + a + ")");
                          if (cart_count.length) {
                              cart_string = '<a class="thickbox tc_view" title="' + cart_view + '" href="#" onclick="return false;">' + '<span class="tc_cart_view_text">' + cart_view + '</span><span class="tc_cart_count" class="tc_count">' + cart_count.length + '</span></a>' + '<a class="tc_cart_empty ' + class_empty + '" href="#" title="' + cart_empty + '">' + cart_empty + '</a>';
                              $(cart_el).show().html(cart_string);
                              $('.tc_view').click(function() {
                                  if (!cart_count.length) {
                                      emptyCart()
                                  }
                                  TB_show(cart_name, cart_doc + '&TB_iframe=true&height=350&width=500&action=view', false);
                                  return false
                              })
                          } else {
                              $(cart_el).hide();
                              return false
                          }
                          $('a.' + class_empty).click(emptyCart);
                          return true
                      })
                  }
                  function addToCart(a, b, c) {
                      $.post(cart_doc, {
                          action: 'add',
                          selector: b,
                          item: c
                      },
                      cartCount);
                      $(cart_el).animate({
                          opacity: '0.9'
                      },
                      'fast').animate({
                          opacity: '1.0'
                      },
                      'normal');
                      $(a).animate({
                          opacity: '1.0'
                      },
                      'fast').animate({
                          opacity: '1.0'
                      },
                      'normal');
                      return false
                  }
                  function tcConfig(a) {
                      config = eval("(" + a + ")");
                      cart_name = config['business_name'];
                      cart_view = config['cart_view'];
                      cart_empty = config['cart_empty'];
                      cart_warn = config['cart_warn'];
                      cart_el = config['cart_el'];
                      class_add = config['class_add'];
                      class_empty = config['class_empty'];
                      $('.' + class_add).click(function() {
                          addToCart(this, this.rel, this.name);
                          return false
                      });
                      cartCount()
                  }
                  function paypalForm(a) {
                      $.post(cart_doc, {
                          action: 'item_opts',
                          name: a.name,
                          value: a.value
                      });
                      op_field = a.name;
                      $%2
                    • 8345
                    • 147 Posts
                    Thanks, dirtyharry_10!

                    Unfortunatelly it didn’t help. This code shows wrong product ID information and that information it shows wrongly, too and below it show’s still all the products. http://amaru.com/hemp-porridge-1.html (I copy/pasted your code there.)
                      • 32667
                      • 38 Posts
                      I noticed that some of you were unable to get the add to cart function to work. Was anyone able to resolve their issues?

                      my cart HTML element is set to: .treasure_cart
                      The add element is: treasureChest

                      On my product pages, I have:
                      <p class="product-add">[+treasure.add+]</p>
                      <div class="treasure_cart"> </div>
                      


                      When I click on Add To Cart link on any product page, nothing happens. If I view the cart document, it is blank.

                      If I go to:
                      http://www.mywebsite.com/cart.html?action=add&selector=id&item=1

                      It updates the cart.

                      Something isn’t right with the javascript.

                      Any help? Thanks