We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21417
    • 486 Posts
    Hello,

    I am new to MODx and not a PHP coder.

    I am setting up a shopping cart (using ejunkie as Treasure Cart was not quite there for including multiple products per page and having mutliple calls to view the cart per page - unless someone can show otherwise) with manual links to the shopping cart (with add to cart / view cart buttons)

    The layout for each content block is repeated over 6 or so pages and on numerous times per page (to show the various options such as colour and size) and co-exists with other content on each page.

    I am wondering what the best way is to setup a template to easily reuse the layout of the content block without resorting to chunk upon chunk (which I have setup but which looks like it would be difficult to manage when new products are added) - and what the best way is to manage / create / insert the relevant content.

    (in a similar way to how treasure cart has a template feature for the layout.)

    I was thinking that template variables would not work because of the amount of tv’s (variations) required per page.

    The layout for each content block is as follows:

    <h4>~~variable content1~~</h4>
    
    <div class="prImgBox">  
    <div class="prImg">
    <a href="~~variable content2~~" etc>
    <img src="~~variable content3~~"></a>
    </div>
    </div>
    
    <ul class="prList">
    <li>~~variable content4~~</li>
    </ul>
    
    <p>
    <span class="prPrice">~~variable content5~~</span><br />
    ~~variable content6~~
    </p>
    
    <div class="prBttnWrapper">
    <form etc>
     <input type="hidden" etc value="~~variable content7~~"/>
     <input type="image" etc />
     <a href="#" etc >
    <img src="#" etc /></a>
    </form>
    </div>
    
    <p>
    <span class="prPrice">~~variable content8~~</span><br />
    ~~variable content9~~
    </p>
    
    <div class="prBttnWrapper">
    <form etc>
     <input type="hidden" etc value="~~variable content10~~"/>
     <input type="image" etc />
     <a href="#" etc >
    <img src="#" etc /></a>
    </form>
    </div>



    And this same layout could be used up 4-5 times per page with each layout repeat having different content.

    Any ideas??

    Thanks in advance.
      Web design Adelaide
      http://gocreate.com.au