We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32380
    • 137 Posts
    Hi Hope someone could point me in the right direction,

    I have a project that will require a customer to login to use the shop side of the site, the product being sold will be differenty discounted depending on a pre aggreed amount, is there a way i can somehow use modx x to do this?
    I would also like to intergrate Foxy Cart as the shopping cart.

    Not sure how easly this can be done?
      • 3707
      • 241 Posts
      I reckon MODx and FoxyCart can handle this. I haven’t used discounts on any of my FoxyCart installs but if you head over to the Foxy forums you should find some info. http://forum.foxycart.com/search.php?PostBackAction=Search&Keywords=discount&Type=Topics&btnSubmit=Search
        • 29635
        • 361 Posts
        There are a handful of stores doing this, so yeah, it’s definitely possible. The bigger question is how you’re handling your users, either in FoxyCart -> MODx, or MODx -> FoxyCart.

        Either way getting the discount in place is as simple as a PHx :mo=`Group` call in your add-to-cart link/form. If you have a more specific example we could walk through it together.
          Need MODx Ecommerce? Try FoxyCart!
          • 32380
          • 137 Posts
          Sorry for the Delay have been on holiday,

          I would probably let MOdx deal with the customers and use foxy cart as a basic cart.

          But i am very wet behind the ears re PHx : Mo .
          Thanks for your reply.
            • 29635
            • 361 Posts
            Basically it’d be something like this:
            [+phx:mo=`Reseller`:then=`[*product_price_reseller*]`:else=`[*product_price*]`+]

            Or you could do some math, like...
            [+phx:mo=`Reseller`:then=`[*product_price:math=`?*.80`*]`:else=`[*product_price*]`+]

            That’d give you 80% of the product_price for resellers.

            Make sense? You could do the same thing to add a quantity discount or any other custom modifiers, like:
            [+phx:mo=`Reseller`:then=`
            <input name="blah" value="blahblah" />
            `+]

            Make sense?
              Need MODx Ecommerce? Try FoxyCart!
              • 32380
              • 137 Posts
              I think this might be beyond me, do you know if there is a tutorial re this as it make some sence but i have very little knogledge of php but this does sound like somthing that will do the job!
                • 29635
                • 361 Posts
                How about you post the "add to cart" code (a link or form) that you have already and we’ll use that as an example?
                  Need MODx Ecommerce? Try FoxyCart!
                  • 32380
                  • 137 Posts

                  Basicly i have set up ditto, for this instance i am selling door panels, so you get a grapical chioce (created by ditto) you click the panel you would like then you get to another page with further choices eg glass design for that panel, then you click it to choose, then you get another list of choices ie letterplate, sizes, colour (the above form) that then gets passed to foxy cart, hope this makes scence?
                  • It would be a lot more readable if you put your code between BBcode code tags (clicking on the # code icon in the menu adds the tags automatically).
                      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
                      • 32380
                      • 137 Posts
                       <a href="#" onclick="javascript: qe.open('content'); return false;" title="Edit Document content" class="QE_Link">« Edit content</a> <h1>Beveled Regent</h1>
                       <img src="http://www.mysite.co.uk/modx/assets/templates/Gallery/LG/Blun_bev regent.jpg" width="206" height="450" class="shop-main" />
                        <form action="https://mysite.foxycart.com/cart" class="foxycart" method="post">
                         <input type="hidden" name="name" value="Beveled Regent" />
                      
                          ---> <input type="hidden" name="price" value="100.00" /> <------this is the price that would need to be discounted depending on customer
                      
                      <input type="hidden" name="code" value="" />
                      <input type="hidden" name="inventory" value="" />
                      	<label>
                      
                      <select name="Colour" id="Colour">
                        <option name="White" value="White{p+0.00}">White</option>
                        <option name="Mahogany"value="Mahogany{p+40.00}">Mahogany</option>
                        <option name="WG/WH"value="WG/WH{+20.00}">Wg on Wh</option>
                      </select>
                      <br />
                      <br />
                      	<select name="Thickness" id="Thickness">
                      	  <option value="28mm">28mm</option>
                      	  <option value="20mm">20mm</option>
                      	  <option value="24mm">24mm</option>
                      	  </select>
                      	<br />
                      	<br />
                      	<select name="Letterplate" id="Letterplate">
                      	  <option value="None">None</option>
                      	  <option value="Gold{p+10.00}">Gold</option>
                      	  <option value="Chrome{p+10.00}">Chrome</option>
                      	  <option value="Brass{p+10.00}">Brass</option>
                      	  </select>
                      	<br />
                      	<br />
                      <select name="Backing Glass" id="Backing Glass">
                      	  <option value="Clear">Clear</option>
                      	  <option value="Minster{p+5.00}">Minster</option>
                      	  <option value="Flemish{p+5.00}">Flemish</option>
                      	  <option value="Everglade{p+5.00}">Everglade</option>
                      	  </select>
                      	<br />
                      	<br />
                      	<input type="text" name="Width" id="Width" size="10" value="Width" onFocus="textClear(this,'Width')" onBlur="textRefill(this,'Width')" />
                      	<br />
                      	<input type="text" name="Height" id="Height" value="Height" onFocus="textClear(this,'Height')" onBlur="textRefill(this,'Height')" size="10"/>
                      	</label><br /><br />
                      	<input type="submit" value="Buy It Now!" />
                      </form>