We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14617
    • 47 Posts
    I’m having a doubt, to list each product is necessary to create a document for each product?
    I think no matter what you need to have a document for each product and then call the TC snippet with:
    [[treasureChest? &item=`1`]]
    Where 1 is the product id in the TC module. That sets all the placeholders so you can use eg.
    [+treasure.amount+]
    to show the price


    I wonder if you can list all products as the link http://www.treasurechestcart.com/demo-product1.html, in sequence.
    I would love if somebody knew how to do this. I have tried with ditto but the TC snippet call only sets the placeholders for the first product. If somebody knows how to do this, please share!

    Jonas
      • 16829
      • 4 Posts
      Ok, I repeat the code "[[treasureChest? & Item =` 1 `]]" increasing the item (1,2,3,4,5 ,...).

      But as shown in Figure, the code "[[treasureChest? & Item =` 1 `]]" appears to the user, and only list the same product on the page.
        • 16034
        • 107 Posts
        How does your snippet calls look if you click on the html "icon" in TinyMCE (the backend-editor).

        I think the rich-text editor has added some invisible code that prevents your snippet calls from being parsed.
          MODx snippet-glossary 101:
          Ditto = Content Lister -- Wayfinder == Menu Builder -- Jot = Comment Control
          • 7508
          • 22 Posts
          I’ve nearly got everything setup just the way i want it however, I have a few questions -

          1. is there a way to specify what page/text is displayed if the cart is empty? i notice it returns the below when i view source on an empty cart -

          <script type="text/javascript" charset="utf-8">
                                  parent.emptyCartFunction();
                              </script>


          2. I would like to direct users to a logon page if they click on the ’View Cart’ button if they are not logged in. Ive tried setting the document group on the Cart page so that it requires a login but because it is locked nothing can be added to the cart if you are logged out.

          feel free to take a look here - http://121photo.co.uk/index.php?id=1

          Would really appreciate some help on this!

          Thanks
            • 29525
            • 388 Posts

            This might be a dumb question. . . In the documentation it says:

            &thumb_w
            Thumbnail width
            
            A thumbnail image is automatically generated with phpThumb() for the image you uploaded for your product in the TreasureChest Module. You can specify the width of this thumbnail using the thumb_w parameter (your image is kept to scale). The default thumbnail width is 100 pixels. If you wanted the thumbnail to be 125 pixels wide you would set it in your product page as below [[TreasureChest? &item=`1` &thumb_w=`125`]]
            


            I’m not getting any thumbnails. Do I have to install phpThumbPackage for this to work?

            Thanks.
              www.terrybarthdesign.com
              • 29525
              • 388 Posts
              Anyone?
                www.terrybarthdesign.com
                • 29525
                • 388 Posts

                Hi all, still trying to get my head around TC.

                Do I understand correctly that the treasure chest place holders are not available to ditto? How do I create a structured list of products on a summary page (ditto) where I display the various product elements such as product name, description price, size, and a thumbnail, etc?

                I suppose I could call the [+summary+] placeholder and the data displayed on the product page would appear, but I then lose the ability to select individual data elements for the summary page and to control placement of them.

                I could create a TV for each one of these elements on the product page and then call those from ditto, but I’d be entering some of the data twice creating potential data sync problem.

                I think I’m off track on this but don’t know how to make this work.

                Also, still trying to find out if TC requires phpThumb be installed?

                Been stuck on this for several days now.

                Suggestions?
                  www.terrybarthdesign.com
                  • 4310
                  • 2,310 Posts
                  Terry,
                  Here’s one way of doing it....
                  Ditto call on parent folder :
                  [!Ditto? &parents=`3` &depth=`1` &display=`all` &tpl=`product` !]

                  Ditto product template
                  <div class="item"><div class="desc">[+description+]</div>[+content+]</div>

                  Actual content on product page, could be put into a chunk or into a product template.
                  Using the description tv to supplement the info from the TC module
                  [[TreasureChest? &item=`109`]]
                  <h2>[+treasure.item_name+]</h2>
                        <div class="detail">  [+treasure.image.thumb.thickbox+]
                          <p>Price <strong>$[+treasure.amount+]</strong></p>
                          <p>Shipping <strong>$[+treasure.shipping+]</strong></p>
                          <p>Inventory <strong>[+treasure.inventory+]</strong></p>
                          <div class="desc">[*description*]</p>
                  </div>

                  Good luck wink
                    • 29525
                    • 388 Posts
                    Thank Bunk58

                    I think you’ve confirmed what I had thought. Since I can’t include the TC place holders directly in the ditto tpl, I will have to call the content area from the product page that contains the output of those place holders. Then I can add any additional TVs from the product page to the ditto tpl for the summary page if needed.

                    The TC data output on the product page will have to be formatted in the same was I want it to appear on the summary page.

                    Product Page:

                    Content Area: TC placeholder output for item, price, inventory, image thumb, etc.
                    TV for Short Description: Short text description
                    TV for Full product info: Additional product information, specs, images, etc.

                    Summary Page:

                    The ditto call will include a tpl that displays the content area from the product page plus any additional TVs created for each product.

                    I think this will work. Let me know if I missed anything.

                    Thanks again for helping me with this.

                    Terry
                      www.terrybarthdesign.com
                      • 4310
                      • 2,310 Posts
                      Your thinking on the layout/summary looks like it should work.
                      Our product pages only have the info for the ditto summary & there is no link to the full page so it was easy wink