The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

MODx + FoxyCart thread

cfncfn Member
in Help edited September 2008
Are there any creative ways to use Template Variables in the creation of links?

Im trying to think if there's a way to use a TV for price and a TV for item name, so my client could just change it in a TV field, and then the link would auto-update with the right price.

Any thoughts you have about using Chunks and TV's to make the cart implementation easier, let me know. This is a client with 117 products in 26 categories.
  • brettbrett FoxyCart Team
    We do that all the time, if I'm understanding you correctly. I usually set up a handful of product TVs, like product_price (number TV), _code, _category (select box TV).

    It's not a bad idea to use some PHx to make sure they're formatted correctly:
    That'll help make sure they don't enter a value that borks your links (like a single/double quote or an ampersand or etc.). I'm big on "idiot-proofing" sites before handing them over to clients, so whatever you can do in that regard is probably worth it.

    (We're also huge fans of phpThumb for wherever you use image TVs.)

    Does that help?
  • lukeluke FoxyCart Team
    edited April 2009
    s9, if you're interested, I've got a dummy MODx install and database already setup with all TVs, phpThumb, PHx and most everything else you'd need to get a MODx store off the ground. If you're interested in checking it out, let me know.

    Edited: Sorry all, we should have a tutorial available here eventually:

    What I have just isn't in a place to distribute or support.
  • Yeah, I'd love to check that out, Luke. Thanks!
  • Luke,

    I would love to see that dummy modx install as well. You could PM to me know modx forums or email it to me if you'd like. I would love to see how you guys did it.
  • cfncfn Member
    Its definitely helpful Luke... I figured out PHx today, and a little bit about Wayfinder. I decided to build my own MODx install but use yours as a study tool.

    Next steps are trying to solve a pHpThumb issue, and then learning how to create a dynamic category page.
  • brettbrett FoxyCart Team
    What's the phpThumb issue?
    Fwiw, I usu create a chunk called {{constant.thumb}}, then put the path to phpThumb in there (usu /assets/thumb/phpThumb.php), then just call it directly in my chunks and such. I know there's a snippet but I've never seen any advantage in using it (though I might just be missing the point).
  • cfncfn Member
    phpThumb seems like a complex piece of work.

    Its just doing nothing and the code is so dense that I can't even see what to try next. I'm basically thinking about abandoning it and hardcoding any image resizing I need.

    I posted on the MODx boards:,16002.msg178411.html#msg178411
  • cfncfn Member
    edited October 2008
    I'm going to try your way of coding it: so you placed phpThumb in its own folder: not in the snippets folder... okay...

    and so foxyThumb is born.
  • brettbrett FoxyCart Team
    Oh... yeah I never use the package/snippet. I just stick the phpThumb files on the server (the raw phpThumb files, not the MODx package) and call it that way. Make sure you do the demo.check files to make sure your server can actually handle what it needs to handle.
  • cfncfn Member
    This code:

    <img src="/assets/foxyThumb/phpThumb.php?src=/assets/images/productPhotos/logo.png&w=150&h=113" />

    still returns a blank.

    I'm wondering what I could possibly be missing. Is there anything I need to install anywhere other than that thumb folder? I'm sending HostGator another note too... doubly making sure that everything is ok on their end.
  • cfncfn Member
    Prob solved by the HostGator guys: "The reason this is not working is because you are using a temp url, server/~user and the script is trying to call the domain."

  • cfncfn Member
    Just an FYI for anyone building Foxy/MODx stores:

    Great instructions here on how to create filters for your products/categories using Ditto.
  • cfncfn Member
    edited October 2008
    One more questions Luke and Brett:

    1) Any reason why you have TinyMCE turned off in the sample store? Would be great for rich text formatting on product pages...

    BTW thanks for everything, the store is coming along great.
  • brettbrett FoxyCart Team
    I personally loathe RTEs. I've been doing Textile exclusively for about 2 years now. No matter how much you think the client won't screw things up... they will. They'll paste in a crazy massive image that'll destroy your layout. They'll paste in garbage from MS Word and completely destroy things. They'll add stupid crazy ugly 64pt Comic Sans center aligned, BRIGHT RED!

    So that's why ;)
    Clients will protest but if they don't trust you that you're making a decision that's going to save them time and money in the long run, you probably shouldn't be working with them.

    My 2¢, at least. Markdown is nice as well, but Textile is a bit more common so more people are already familiar with it, in my experience.
  • cfncfn Member
    edited October 2008
    Haha =) Yeah... tough sell but good thinking. I've been verrrrry frustrated with them lately too.

    Textile looks great.

    I just started typing out a message about Related Items not working well, but I caught a snippet typo and now those are good to go.
  • brettbrett FoxyCart Team
    Missing the final backtick?
  • cfncfn Member
    edited October 2008
    Yup! Caught it. I had to see it on screen before I realized it was missing.
  • cfncfn Member
    Would you guys be able to help with some css for the category page?

    I want to have ditto display the items inline (3 horizontally across, then down.)

    I'm attempting to use <li> for this, but I'm still not getting it to work.

    Here's the HTML from the chunk:

    <div class="mini_product"><ul><li>
    <a style="text-decoration: none;" class="greylink" href="[~[+id+]~]">
    <img src="/assets/foxyThumb/phpThumb.php?src=/[+productImage+]&w=150&h=150" />
    <br />
    [+productName+]<br />
    [+productSubheading+]<br />

    Here's the div.mini_product css:

    div.mini_product {padding:0; margin:0; white-space:nowrap; list-style-type:none; text-align: center; }

    div.mini_product li {display:inline; }


  • brettbrett FoxyCart Team
    We can't really help with CSS (because we just don't have the time, not because we don't want to), but I think I'd try floating the <li> elements rather than display:inline.

    Also, give the 3rd screencast here a look through:
    You can use that method (live editing CSS with Web Dev Toolbar and Firebug) to make quick work of your CSS creation/debugging.
Sign In or Register to comment.