We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15003
    • 85 Posts
    I’m setting up product pages and have created the tv "product-size" so site managers are able to fill in sizes depending on the product. I’m confused as to how to go about doing this. I’m not sure what input type to select. Though it seems like the logical choice, I can’t choose a form field like listbox because the site manager can’t edit the field.

    Since this is a very common thing to do I was surprised that I couldn’t find any previous posts. Maybe it’s so simple that I’m just overlooking it.

    Any help would be soo appreciated:-)

    Cheers! ~Jules
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      text?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 15003
        • 85 Posts
        I am trying to set this up using FoxyCart ---my first time so I’m not real clear on what I’m doing yet.

        Below is the form code I have. The select box code I copied from the FoxyCart wiki(I updated using the names of my TV’s - I also don’t understand why they are using placeholders instead of TV’s?)

        My problem is that several products have different size information and I need to be able to provide a way for the site manager to input the sizes of each product. I’ve been reading through all the instruction pages and I haven’t really been able to wrap my mind around how it all comes together. Although I do have the FoxyCart script and Css links added to my pages, I’m not really there yet. I’m still trying to make the form work correctly on the MODx side.

        If I update the select box code below to use [*product-size*] instead of the placeholder [+product-size+] then a text field works but it only adds one size. I did try a textare(mini) and added a price on separate lines, but all the sizes show up on one line.

        And then there is this page which I don’t know if it’s the right direction to go in since I have more than one varying product size and I don’t fully understand how to implement it at this point: http://wiki.foxycart.com/integration/modx/productoptions

        I guess what I’m hoping for is some advice from someone who has experience with foxycart/modx integration on what the best route to take is. An overview with maybe a few techy tidbits to send me off in the right direction:-)

        Sure appreciate the help:-) ~jules


        <form class="foxycart" action="https://businessname.foxycart.com/cart" method="post" accept-charset="utf-8" name="foxycartForm" id="foxycartForm">            
        
            <fieldset>
                <legend style="display:none;">Make an Appointment Form</legend>
            
                    <input type="hidden" name="name" value="[*pagetitle*]" />
                    <input type="hidden" name="price" value="[*product-price*]" />
                    <input type="hidden" name="weight" value="[*product-weight*]" />                        
                    
                    <label for="size" class="label_left">Size</label>
                    <select name="size" id="size">
                      <option name="size" value="[+product-size+]{p:[+product-price+],w:[+product-weight+],c:[+product-code+]}">[+product-size+]</option>     
                    </select>
                                            
                    <button type="submit" name="submit" value="Add to Cart" class="submit" tabindex="6">Add to Cart</button>                
                    
            </fieldset>
        
        </form>