-
Notifications
You must be signed in to change notification settings - Fork 16
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
Use a line item to add shipping #34
Conversation
Its a useful feature to record the shipping cost in a separate line-item. Here's the resulting line-item records for a $20 purchase that includes $2 as a shipping charge:
I have reviewed the patch and have a doubt that why we are using hard-coded financial type id -8 for recording line-item for sipping charges instead of the default_financial_type. I think it would be appropriate if we allow user to choose Financial type for shipping item in WooCommerce-CiviCRM setting page. |
'line_total' => $shipping_cost, | ||
'unit_price' => $shipping_cost, | ||
'label' => "Shipping", | ||
'financial_type_id' => 8, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we replace it with default_financial_type or a chosen financial type for recording shipping item from setting page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thoughts here are that the plugin should create a new "Shipping" Financial Type in CiviCRM when enabled, if it does not already exist. And then use this "Shipping" Financial Type.
This saves having to provide yet another setting page to update and will work without any user intervention after installation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agileware-justin the plugin does have a settings page to map Financial types, enable address sync, etc. and also a setting on the Product itself, I think it does make sense to have those configurable, WooCommerce has variable shipping rates, and there's also downloadable Products (i.e. no shipping).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mecachisenros nice to hear from you. Cool, agree makes sense to use the existing settings (even though it's yet another settings page YASP!).
@monishdeb @agileware-fj @agileware-justin
|
This builds on #33 and inserts the shipping cost into the CiviCRM Contribution as a line item, meaning it can be synchronised to external accounting packages and shipping costs can be summarised more easlier.