We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38846
    • 30 Posts
    I want to add a button/chekbox/link on the product pages that collects the pagetitle, ID and the main image on the page and sends it to a template that populates in an account profile.

    The accounts are already set up with an if logged in statement that pulls the persons information. I would just like to add a selected resources pagetitle, ID and Main image to a template that would show on one of the account pages. And also be able to set a clear time and allow for removal.

    I have grown quite fond of [IF] so something like:

    <form>
    <input type="checkbox" name="vehicle" value="[[If? &subject=`[[+modx.user.id]]` &operator=`isnotempty ` &then=`` &else=`[[$Quotecart_tpl?]]`]]" /> Add to Quote Cart
    
    </form> 
    



    and in then Quotecart_tpl :


    <table class="list">
    <tbody>
    <tr><th align="left">Quantity</th><th align="left"> Image  </th><th align="left">Product Name</th><th align="left"> </th></tr>
    <tr class="rowstart">
    <td><input id="qty" type="text" name="qty1" value="1" size="3" maxlength="5" /></td>
    <td><span class="thumb_box"> <img class="thumb_image" style="position: relative; left: 0px;" src="[[Image]]" alt="" /> </span></td>
    <td><a href="[[*pagetitle]]">Product Name</a></td>
    <td><a href="[[Remove from account Link]]">Remove</a></td>
    </tr>
    </tbody>
    </table>
    


    Am I on the right track here?

    Eventually I would collect all the data in the cart and send out an email which would be another Thread, but I have already done this before with form it. So not that big of a deal.
    [ed. note: darwin last edited this post 14 years, 3 months ago.]
      • 38846
      • 30 Posts
      If anyone is interested. I solved this with UserValueList. There are some tricky parts to this but I managed to get a wishlist working perfectly. I am going to style it before moving on to pushing the wishlist information to a quote cart.

      Once a quote cart is finished it should be pretty simple to push that into a purchasing system without any third parties other than for payment transactions and of course with HTTPS.