We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4385
    • 372 Posts
    How to disable cart button? I have a chunk to format the shop-item, but how do you have alternate chunk when [+inventory+] equals 0?
      DropboxUploader -- Upload files to a Dropbox account.
      DIG -- Dynamic Image Generator
      gus -- Google URL Shortener
      makeQR -- Uses google chart api to make QR codes.
      MODxTweeter -- Update your twitter status on publish.
      • 4385
      • 372 Posts
      Okay, I cheated.
      [+inventory:is=`0`:then=` style="display:none" `+]

      <div class="shs-tocart shk-item shopItem" [+inventory:is=`0`:then=` style="display:none" `+] >
           <h3>[+longtitle+]</h3>
           <p>[+introtext+]</p>
      <form action="[~[*id*]~]" method="post" class="shk-form">
        <input name="shk-name" type="hidden" value="[+longtitle+]" />
        <input name="shk-id" type="hidden" value="[+id+]" />
        <input maxlength="3" name="shk-count" size="2" type="hidden" value="1" />
           <strong>Size:</strong> 
      [[shk_widget? &tvname=`sizes` &docid=`[+id+]`]]
      <br clear="all">
          <p class="price">$<span id="stuff_[+id+]_price" class="shk-price">[+price+]</span></p>
          <button class="shk-but"><img class="shk-image" src="assets/templates/images/add2cart.gif" alt="add to cart" /></button>
      </form>
      </div>
      [+inventory:is=`0`:then=`<p>Sold Out</p> `+] 
      
        DropboxUploader -- Upload files to a Dropbox account.
        DIG -- Dynamic Image Generator
        gus -- Google URL Shortener
        makeQR -- Uses google chart api to make QR codes.
        MODxTweeter -- Update your twitter status on publish.