Copied to clipboard

Flag this post as spam?

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


  • Sibren 40 posts 212 karma points c-trib
    Jun 29, 2020 @ 18:35
    Sibren
    0

    How can I go about using both virtual items and physical items?

    The case is: I have ebooks, I want to send them by email, but I also have physical products, I want to send them by post.

    Can I somehow tell per product what it is? I'm thinking of having a structure like:

    • Books

      • Ebooks
      • Physical books
    • Subscriptions

    The ebooks are sent by mail, so are the subscriptions, but they have to buy the physical books too and pay for them and the postal costs. I also want to be able to send books to ie. NL for 5 euro shipping costs below 100 euros, but for DE the shipping costs are 10,-, except when over 200,-, then it's free.

    Also: my subscriptions and ebooks need to come from an external datasource, but that shouldn't be a problem, right? The documentation gives me some basic idea, but I would like some more clarification before buying.

    Edit: markup

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Jun 30, 2020 @ 08:19
    Matt Brailsford
    100

    Hi Sibren,

    RE product type, I'd probably create a dropdown data type for "Product Type" and have 2 options of "Physical" and "Virtual". You can then define a property on your product of "productType" to define it's type and then configure the stores "Product Property Aliases" field to auto copy the productType value to the order line.

    On checkout you can then use loop through the order lines to find which lines are physical goods and which are virtual and process the accordingly.

    For shipping, you could implement a custom shipping calculator to check whether the order contains shippable items and decide whether to charge them the shipping fee or not. For the free shipping, I'd probably use a automatic discount.

    Regarding external data sources, this is possible yes with a custom ProductAdapter, however there is only one ProductAdapter per install so you'll probably need to make a hybrid product adapter which extends the default one and detect whether the product reference is a node key or a reference for your external data then depending on which it is, return the appropriate product info.

    Hope this helps

    /Matt

  • Sibren 40 posts 212 karma points c-trib
    Jul 01, 2020 @ 19:38
    Sibren
    0

    Thanks Matt, I've now created virtual products in your demo, and they seem to work fine (for a prototype).

    This gives me comfort that we can build the custom shipping calculator as well.

    I will advice going with Vendr and I think you should see our first order coming in quickly.

Please Sign in or register to post replies

Write your reply to:

Draft