Closed (fixed)
Project:
Commerce Default Tax Rate
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 Apr 2014 at 09:58 UTC
Updated:
10 Apr 2014 at 08:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
andyd328Hi zekvyrin,
Many thanks for the patch, I'm not seeing a change though - both lines look the same to me. I understand the issue though and am either missing something or would welcome another patch :)
Cheers
Andy
Comment #2
zekvyrin commentedYou don't see anything because i probably messed up something when creating the patch...
the "if" line is missing.. sorry
I uploaded the proper patch.
Comment #3
andyd328Many thanks zekvyrin, patch added and new release made.
Comment #4
andyd328Thanks for the patch zekvyrin
Comment #5
andyd328Comment #6
zekvyrin commentedThanks for adding it to the module Andy!
Please commit it as well on drupal.org's git (and add me as author if you can)
Thanks!
Comment #7
andyd328Hi Vasilis,
I think it's too late to add you as author the way I should have - sorry, will do better next time.
I've made a new release with your patch in it - is there something else I should be doing on git?
Cheers!
Comment #8
zekvyrin commentedI think you should use drupal.org's git somehow to "add" commits to the project so they appear like this:
https://drupal.org/node/2184095/commits
This way, anyone can get the repository (with latest commits) and work with the project's latest version (for any development reason),
using these instructions:
https://drupal.org/project/commerce_default_tax_rate/git-instructions
Now by cloning the repository I get the previous version, and any new patch created using it, might fail (conflict).
I'm not exactly familiar with the procedure as I don't have a project on my own. Maybe this documentation can help:
https://drupal.org/node/1013552
I guess you simply need to clone it, make your commits (and possibly attribute authorship) and push the code.
Comment #9
zekvyrin commentedHello again,
I found out that the "if" I added might not work well (not applying default value), because tax module sets empty "#default_value" for tax (but it sets it). Sorry.
Instead of this line:
if (!isset($form['commerce_price'][LANGUAGE_NONE]['0']['include_tax']['#default_value'])) {
I propose this (which checks if the product is new and applies the default value):
if (isset($form['#entity']->is_new)) {
The patch is an edit from the previous one.. Will not apply to version 1.2
Sorry for the confusion.. My fault.
Comment #10
andyd328Many thanks - have patched and committed, it should be available shortly. And hopefully the repository will be in sync with the releases.
Comment #11
zekvyrin commentedHello Andy,
Thanks for the update.
Just a notice for the repository thought (the module is fine).
It has been updated, but for some reason, it's not "clean" and not correct.
It has some differences with the module (not going to work well),
there are some commented lines (ini_set & error_reporting commands )
and my previous .patch files (first 2) are included.
I'm uploading you a patch to help you fix these. This is just a patch for the repo I got by cloning (https://drupal.org/project/commerce_default_tax_rate/git-instructions), not for the actual module.