We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28676
    • 136 Posts
    I`ve never attempted to write my own snippet becuase I`m not very good with php, so I`m hoping you can help me. I`m trying to integrate "shopwindow client" into modx. Shopwindow client is a php driven shopping cart/affiliate website package and it does allow for integration.

    So my question is how do I turn this php include/call

    <?php
    require_one('sw/gloval.inc.php');
    
    $oFeaturedMerchantsParams->iCategoryId=4;
    $oFeaturedMerchantsParams->iLimit=2;
    include ('sw/includes/elements/featured_mechants.php');
    ?>


    Into a snippet? would it be possible to have a snippet call where I could pass multiple inclueds and multiple $oFeaturedMerchantsParams?

    I know you chaps are all very busy so any help would be wicked!.

    cheers
    Simon
      I made my first site with modx
      ------------------------
      http://www.shop-bright.com | Uk shopping blog
      • 28676
      • 136 Posts
      Well I suppose that is a start, I was hoping for something more but I have to stop getting lazy.

      cheers
      Simon
        I made my first site with modx
        ------------------------
        http://www.shop-bright.com | Uk shopping blog
        • 42842
        • 12 Posts
        Hi guys!

        My Question is related to this here so I post it here:
        I want to display this content: http://heartandtruelove.com/vimeo.php?id=123456

        So i created the php into a snippet:
        <?php
        $imgid = $_GET['id'] . $id;
        $hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$imgid.php"));
        echo $hash[0]['thumbnail_medium'];
        ?>
        

        and i can load the snippet like this:
        [[!vimeo_thumb? &id=`123456`]]

        BUT, here comes the problem, I don't get the same thumbnail link like here:
        http://heartandtruelove.com/vimeo.php?id=123456

        My guess was, that I am doing something wrong in the php code, what could it be?
        thanks for fast response! =)