Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Caractacus Downes 81 posts 314 karma points
    Aug 25, 2016 @ 08:49
    Caractacus Downes
    0

    Product Variants in FastTrack

    Hi,

    Working on a U7.4.3, M2.1.0, FT2.1.0 site and i have a question relating to products with options.

    My example product has different options which each have a different price. Adding options to a product is very straightforward, and the drop down on the front end works well, but I can't see any way to set different prices for the different options. This may be by design, or I may be missing something.

    An example of what I'm trying to achieve is - the product is a place on a training course. The options are to do with whether you'd like to book accommodation as well, and the different accommodation options have different prices associated with them (B&B, Hotel, Camping etc.).

    Once I've got this working I then need to be able to put a price on the screen for the options currently selected - I guess this will be a bit of JavaScript tagged on to the onChange event of the option dropdown, but I'll need to get a list of the options and their prices out of the system when building the page.

    Any suggestions appreciated.

    Cheers,

    Crac

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Aug 25, 2016 @ 17:05
    Rusty Swayne
    1

    If you look in the merchello.ui.js file the addItem module (source is here https://github.com/Merchello/Merchello/tree/merchello-dev/src/Merchello.Mui.Client/src/jquery/mui/modules/additem) constructs a ProductDataTable js object which contains a collection of ProductDataTableRow js objects. One row represents the product itself and the rest (if any) of the rows will be varaints.

    If I understand what you are trying to do correctly, you could either completely override the addItem module, or redefine one or more of the methods to get it to do exactly what you want.

    I'd be interested in hearing how it goes =)

  • Caractacus Downes 81 posts 314 karma points
    Sep 05, 2016 @ 09:53
    Caractacus Downes
    101

    Hi Rusty,

    I've just realised that I've missed something very obvious which does exactly what I want to do - I hadn't spotted the 'Product Variants' tab which allow you to set different prices for each options combination.

    Sorry to have bothered you ... must be sitting too close to the screen ...

    Thanks for your help.

    Cheers,

    Crac

Please Sign in or register to post replies

Write your reply to:

Draft