Jump to:

2088 Posts in 1008 Topics by 455 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » 2 quick questions

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 1353 Views
  • SnowBoarder82
    Avatar
    Community Member
    52 Posts

    Re: 2 quick questions Link to this post

    Just another thought.

    I have another project i'm looking to update that has existing pricing modifiers. As 0.8.5 has been overhauled in terms of modifiers, should my exisitng modifier's still work after the upgrade?

  • Jedateach
    Avatar
    Forum Moderator
    227 Posts

    Re: 2 quick questions Link to this post

    They will probably need some slight changes.

    See the upgrading docs.

  • SnowBoarder82
    Avatar
    Community Member
    52 Posts

    Re: 2 quick questions Link to this post

    Thanks for providing the FastwayNZShippingModifier.php as an example Jedateach. This is far more complex than I need though and I think for the outcome i'm after it would be cleaner to do a straight reference off of the ShippingState field entered by the customer, instead of them entering their shipping state info twice / having to make these two fields correlate (or 3 with a seperate shipping address).

    I would set a default state to start. Then what would be the best way to reference the shippingstate field entered on the orderform?

    Thank you

  • Jedateach
    Avatar
    Forum Moderator
    227 Posts

    Re: 2 quick questions Link to this post

    You can reference the order ShippingState from within the modifier code like this:

    $state = $this->Order()->ShippingState

    Note you'll need to introduce a javascript update of the page when you choose shipping state at checkout.
    Alternatively, the FastwayNZShipping approach uses a form submission to update the location, set on the modifier. You could use the same approach to update the order ShippingState.

    I still need to take these ideas and implement some generic way to make updates to cart totals, based on location. Perhaps I could split the address entry into a checkout step that comes before the cart.

  • SnowBoarder82
    Avatar
    Community Member
    52 Posts

    Re: 2 quick questions Link to this post

    Thank you very much Jedateach!
    I appreciate your quick reply.

    I'll try working with that for now. I think the two step process would also be a good idea.

    Best regards,

  • SnowBoarder82
    Avatar
    Community Member
    52 Posts

    Re: 2 quick questions Link to this post

    Sorry Jedateach,

    I'm a bit stuck on introducing a javascript update of the page when selecting a state on checkout. I was looking into implementing onselect onto the state dropdown i've created but i'm not sure how this all fits in with the Ecommerce FieldSet created in EcommerceRole.php (note: i'm looking to implement this modifier temporarily in Shop 0.8.3 until my Paypal transactions go through in my test of 0.8.5).

    Do you have an example of code I could refer to for creating this javascript update?

    Thank you,

  • Jedateach
    Avatar
    Forum Moderator
    227 Posts

    Re: 2 quick questions Link to this post

    A javascript update with jquery should be simple as:
    $("input[name=State]").change(function(){location.reload();});

    Follow the progress of the paypal fix here: https://github.com/burnbright/silverstripe-shop/issues/63

    1353 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.