Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Shipping methods be available based on cart conditions #545

Open
johfeu opened this issue Jul 3, 2024 · 2 comments · May be fixed by #547
Open

Make Shipping methods be available based on cart conditions #545

johfeu opened this issue Jul 3, 2024 · 2 comments · May be fixed by #547

Comments

@johfeu
Copy link
Contributor

johfeu commented Jul 3, 2024

Feature Request

Is your feature request related to a problem? Please describe.
Use Case: A shop with virtual/downloadable and physical products. Shipping method A with 0,00 is used by default and shipping method B with actual costs should be used as soon as physical products are in the cart.

Describe the solution you'd like
this could be achieved using the same Typoscript condition setup as for the extra costs e.g. by_number_of_physical_products

Describe alternatives you've considered
Only using conditional costs with amount 0,00 is not an option because it confuses customers

@johfeu
Copy link
Contributor Author

johfeu commented Jul 3, 2024

example config

    shippings {
        countries {
            de {
                preset = 1
                options {
                    1 {
                        title = PDF/E-Mail
                        taxClassId = 1
                        fallBackId = 2
                        status = open
                        free {
                            from = 0
                        }
                        available = by_number_of_physical_products
                        available {
                            0 {
                                value = 0
                                available = 1
                            }
                            2 {
                                value = 1
                                available = 0
                            }
                        }
                    }

                    2 {
                        title = Postversand
                        taxClassId = 1
                        fallBackId = 1
                        status = open
                        extra = by_number_of_physical_products
                        extra {
                            1 {
                                value = 1
                                extra = 5.00
                            }
                            2 {
                                value = 10
                                extra = 20.00
                            }
                            3 {
                                value = 99
                                extra = 99.00
                            }
                        }
                        available = by_number_of_physical_products
                        available {
                            0 {
                                value = 0
                                available = 0
                            }
                            2 {
                                value = 1
                                available = 1
                            }
                        }
                    }
                }
            }

johfeu pushed a commit to johfeu/cart that referenced this issue Jul 4, 2024
…extcode#545)

Implemented the ability to configure conditions in typoscript setup to switch shipping methods
based on products in the cart. This allows e.g. for dynamic application of shipping methods,
ensuring that shipping method A (free) is used by default, and shipping method B (with actual
costs) is applied when physical products are detected in the cart.

Fixes: extcode#545
@rintisch
Copy link
Collaborator

rintisch commented Jul 5, 2024

Interesting! This is a nice feature imo. 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants