MODx Integration Question

LewisSellersLewisSellers Member
in Help edited May 2012
Hi There,

I'm using MODx and Foxycart together and I have a couple of things that I need to do. I'm not sure if Foxycart will allow me to do it, so any help would be appreciated!

1) First of all, we are a subscription website. When you click a 'join now' link at the moment, then click off and click 'join now' again, it adds two items to the basket (one for the first time you clicked and one for the second). Ideally, we want it to technically clear the basket when they click off? Or just miss the cart out all together. People will only add one product to the basket on our site. Is this possible?

2) Second of all, we are going to be running a large promotion soon where people will receive a £xxx discount off their first quarter subscription via a hidden page. After 3 months, it will go back up to the standard price. So my question is, can you set a different price for the first payment than the others? And if not, is there a way to get a coupon automatically added to the sub that will discount the first month by say, £100 or so?

If it helps, our website is http://www.secretserviceinfo.co.uk

Any help would be great!

Kind Regards
Lewis
Comments
  • lancelance Member, Community Support Member
    Lewis,

    If you know that there will only be one product at a time in the cart, you could always clear the cart on the Add to Cart action. To achieve this, simple add this parameter to your query string:
    empty=true
    

    Every time something is added to the cart, it will be cleared first.

    Lance
  • lancelance Member, Community Support Member
    Lewis,

    I seem to have completely ignored question 2, sorry. On the site, it looks like you are billing quarterly or less often, but you ask about discounting the first month. Will the promo be for a month-to-month plan, or are you looking for a way to discount the first quarter?

    Lance
  • Hi Lance,

    Thank you very much for that!

    Added it in and it works like a charm!! I've been trying to find a way around that for ages.

    Thank you for your help, I just need to get the other question sorted. Basically, we're going to run a promo where people can get the first 3 month subscription for £149. After three months, the price will go back up to £275.00. So effectively, we just need to discount the first quarter (it's going to be billed quarterly anyway).

    Hope that makes sense?

    Thanks again!
    Lewis
  • lancelance Member, Community Support Member
    edited May 2012
    Lewis,

    How long will the promotion run? If it will run for 3 months or less, you could create a single coupon code with an expiration date that is 3 months from the first date of the promo. This would be a discount for £126 and would apply the first time the transaction is run; however, it would not apply on renewals, since the coupon would then be expired.

    You can automatically add the coupon to the cart from the hidden page using the coupon parameter, like:
    coupon=COUPON_NAME
    

    If you're running the promo longer than three months, you would probably want to setup a new coupon code for each 3-month period, otherwise renewals would have the discount applied.

    Might this work?

    Lance
  • Hi Lance,

    Sorry for the delayed reply but thank you for all your help with this!

    Ok, the discount isn't likely to last more than three months, so hopefully I can get that to work. We will probably force people to sign up between two dates (maybe the 1st of June - 1st of July), so then I could set the coupon to work over that month and the period after that will go back up again.

    Will the system automatically charge the higher amount? As in, people who sign up at the price of £149.00 will then go up to £275 once the coupon ends?

    Just one final question you may be able to help me with. I seem to have broken something slightly.
    http://www.secretserviceinfo.co.uk/betting-advice-membership.html

    If you go to the above page and click on 'sign up', it used to open in a modal window, though it doesn't anymore. It takes you off the site to foxycart. Any ideas why that might be? I'm assuming I've missed either a tag out or deleted a JS file but I didn't originally set it up.

    Cheers
    Lewis
  • lancelance Member, Community Support Member
    Lewis,

    As long as the coupon has expired the price should return to the original price when added to the cart. Make sure the price when adding to the cart is the price you want it to be after the promotion, and use the coupon to discount it appropriately.

    As to your second question, it looks like you may have fixed this since your post yesterday, as it is opening in the modal window just fine for me. If you are seeing difference behavior still, let me know and I'll see if I can spot anything that might be the cause.

    Lance
  • Hi Lance,

    Once again, thanks for your response.

    Yeah, I managed to sort the issue yesterday. Looks like the NivoSlider on our homepage was causing a JQuery conflict. The only page the Join Now button doesn't work on with the modal now is the homepage when it's clicked on the Menu but I think we can live with that! :)

    Ok, I think we are set with everything then. Now, if someone clicks, I've got it to automatically add a coupon that discounts the price down to £149. When the promo goes out, I'll set the coupon to expire a couple of days before the subscription is due to take the second payment from our customer. That way, I should be correct in thinking their second quarter payment (which will be automated) will be for the full £249? The customer shouldn't have to do anything and as long as I set the coupon to expire, it should all be fine.

    If that's the case, then we're all fixed up!

    Thanks for your help with everything.
    Lewis
  • lancelance Member, Community Support Member
    Lewis,

    As with all things, I'd recommend testing all functionality to be certain it behaves as expected, but the way you've described the subscription flow is the way it should work.

    As for the modal window on the homepage, it looks like you aren't including the FoxyCart files on the homepage. Since you are loading jQuery for the slider box, you should omit the FoxyCart call to jQuery, but include foxycart.complete.js and the FoxyCart css. If you call jQuery again it could easily cause conflicts.

    Lance
  • Lewis, can I butt in here and ask you a question please? Are you using MODX revolution? I'm asking because I have a client that has a small ecommerce requirement and I was thinking of MODX + an ecommerce plugin but there doesn't seem a lot of information for Revolution. Normally I'd use an ASP shopping cart but for this client it's way too much so I'd rather use MODX. Can you help?

    thanks

    David Heriot
  • Hi Lace,

    I'll have a look at the issue you've pointed out on the homepage. Hopefully I can fix that so once again, thanks for your help! I'll be sure to test everything and make sure it works properly before we go live.


    PFSMedia, I'm using MODx Evo for this project. I've used Revo quite a few times in the past. MODx is a really nice system to use and very powerful. It's pretty easy to use once you get your head around it. Really can't fault it though!!

    If you've got any questions about it, just let me know and I'll try help you out! :)

    cheers
    Lewis
  • Thanks Lewis. I'm familiar enough with MODX, but stopped using evo when revo was released. From what I can see on the forums, integration with Foxycart is for evo - certainly there's little info on revo-foxy integration. Would you think revo would work just as well with foxycart? I'm happy to use evo if the foxycart integration is better - would you recommend one way or the other?

    thanks

    David Heriot
Sign In or Register to comment.