Hi,
how to hide shipping information pane on checkout for non-shipping product ? and show it on physical product?
thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | commerce_physical-disable_shipping_pane_when_no_shippable_orders-1390190-17.patch | 2.38 KB | cvangysel |
Comments
Comment #1
rszrama commentedThis would be a feature request for the Commerce Physical Product or Commerce Shipping modules. I'm not sure which, but let's put it in Physical Product for now since that module isn't technically required for Commerce Shipping but would be required to satisfy this feature request.
Comment #2
artatac commentedI would also value this feature
Comment #3
pixhail commentedGuys, i have wriiten custome module for this. what it does:
there is a boolean value, in the form of checkbox. if checked, means items are shippable, and during checkout, shipping info pane would be seen. But if not checked, means non-shippable, then during checkout, no shipping info pane would be seen.
Contact me, if you want to see it and the module.
Comment #4
poniesConsider yourself contacted pixhail! Do you have a sandbox set up?
Comment #5
artatac commentedTo save others having to ask this is not free but available for $99
Comment #6
pixhail commentedyes, i do have
Comment #7
pixhail commented$99 is much to save the task?
Comment #8
Anonymous (not verified) commentedI'm pretty certain @pixhail that the issue cue is not a place to sell your code. You need to PM someone if they/you're interested in selling/buying.
Comment #9
switch13 commentedRe-posting comment on the active issue:
I'm also working on this currently. Not by product but rather giving the customer the option of picking up the order or having it delivered.
My idea is to create a module (open to community of course) that will have a radio button field as the top pane on the checkout page with the "Pickup" or "Delivery" options. This would default to Pickup and would have the Shipping information disabled and hidden at the start.
I have two issues currently:
Any one else run into any of this? or care to share any findings?
=>switch13<=
Pete
Comment #10
switch13 commentedIs there a way to delete posts 3-8 so people will not be deterred by the salesman?
Comment #11
rszrama commentedSadly, no, but we can just work a little faster to get it into the module itself. : D
Comment #12
WorldFallz commentedWebmasters can delete/unpublish the posts-- ryan if you'd like me to do that, just say so on this issue.
@pixhail: you've already been asked in another thread-- please don't use the issue queues to sell code.
And to anyone who has the module, all drupal modules must be GPL so feel free to make it available yourself if you want.
Comment #13
WorldFallz commentedalso, @switch13 if you could post your code as a patch i'll try and help (i have the same pickup vs delivery use case to solve as well).
Comment #14
duaelfrI had to do something close to this issue for a project.
Someone asked me to free my sources so you can find something here : #1518034-27: Disabling or Hiding shipping options and line item if no products are shippable?
I have no time to provide support for this but it may work for the common case.
Comment #15
switch13 commentedThanks DuaelFr, not quite the functionality I was looking for but that will definitely come in handy!
@WorldFallz check out this thread:
http://www.drupalcommerce.org/questions/3304/how-hide-checkout-panes-bas...
UrmasZ came up with a work around that seems to be working great for me so far.
Comment #16
brephraim commentedSee http://drupal.org/node/1518034#comment-6643632 and the comment below.
Comment #17
cvangysel commentedThe attached patch exposes a new setting which hides the shipping services pane if the order is not shippable. Whether or not an order is shippable is determined by
commerce_physical_order_shippable($order)and currently means it has no line item with an associated weight or dimension.This behaviour could be changed so that a product should be explicitly be made non-shippable, as currently it's quite prone to user error. Does anyone have a good suggestion on how this should work?
Comment #18
brephraim commentedI don't have any ideas off the top of my head about that new approach, but I would recommend changing the current approach from checking for associated weight/dimension to testing for weight/dimension > .01, or whatever. This is because some product types may have a weight or dimension field, but individual product entities may have those set to zero, in which case module as patched will think they are shippable when they are not.
Comment #19
rszrama commentedChanging the way we determine product shippability can be discussed in a separate issue; the API function itself is still correct for the feature needed in this issue.
Comment #20
elperuanito commentedWorks very well for me! Added the following in my situation (lines 48&49):
$checkout_panes['customer_profile_shipping']['page'] = 'disabled';
$checkout_panes['customer_profile_shipping']['enabled'] = FALSE;
This to account for the customer shipping info which I had on the same pane as the shipping options. In my solution every shippable product MUST have a weight and so this caters perfectly. Thanks for this. :-) Saved me a headache.
Comment #21
nodecode commentedFor reference, the following module provides a great rules-based solution http://drupal.org/project/commerce_rules_extra
A relevant implementation example is right there on the project homepage.
Comment #22
torgospizzaI'm running into issues here now as well. I have also looked at Commerce Rules Extra, which does add a fair amount of flexibility, but I still think the way checkout panes are handled could be improved. The way the Rules Extra implementation works is it disables the shipping pane globally for the user. (In other words, if my Rule is set to disable the Shipping Information pane when no shippable products are in my cart, and I go to the Checkout Settings page with a digital item in my cart, I won't be able to change the weight of the Shipping Information pane in the admin section because the Rule is firing and setting the pane to "Disabled".)
This seems like a general DX problem and I think should be addressed in the Physical Product module. A boolean option for 'enabled' might suffice, or some additional parameters that allow shipping panes (and pages) to be skipped or hidden would be ideal. At the very least, consider merging the rules from Commerce Rules Extra, which allows us to handle some of this using additional Rules reactions to hide the shipping pane (but skipping the shipping page is still somewhat murky).
Related issue and patch: #1344962: Add some helpful rules conditions
Comment #23
bisonbleu commentedFollowed @nodecode's advice in #21 and after installing commerce_rules_extra, I was able to create a simple rule that hides Billing & Shipping information panes from the checkout workflow.
Thanks all!