This little module is an extension to the rules included in commerce to help you setup shipping costs.
It will allow you to add conditions selecting the vocabularies that you need and the terms you want to base your condition on.

The module will check all the products in the basket(commerce order) to see if there are matches with the conditions you have set.

You can find this module here: http://drupal.org/sandbox/redsd/1926096
Git repo: http://git.drupal.org/sandbox/redsd/1926096.git
Pareview: http://ventral.org/pareview/httpgitdrupalorgsandboxredsd1926096git
it's designed to work with drupal 7 with the commerce module.

Review(s) I did:

Comments

dustin bons’s picture

Status: Active » Needs review

First of all if you want a review, update the status to "needs review".

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

redsd’s picture

ahhh... that was dumb :)

erez111’s picture

Hi redsd,

Few comments:
1. Make your own functions (not hook) on a different file.
2. vocabularie => vocabulary ;)

I haven't changed project status, but please fix #1.

Good luck!

chetan-singhal’s picture

Status: Needs review » Needs work

It appears you are working in the "7.x-1.0" branch in git. This git branches do not match the release branch pattern.
So remove or rename this branch.

For additional resources please see the documentation about release naming conventions and creating a branch in git.

redsd’s picture

Working on it! the working version is in 7.0-1.x , however I can't seem to delete 7.0-1.0, git keeps giving me error when I try to push the deleted branch.

chetan-singhal’s picture

First set default branch 7.0-1.x
then checkout 7.0-1.x branch
after
Mighte be
git branch -D 7.0-1.0 this will help you

redsd’s picture

Status: Needs work » Needs review

Okay thanx for the info!

I split the module in 2 files and fixed the typo.
I also fixed the issue with not being able to delete a branch, thanx to cpsinghal.

davidam’s picture

redsd’s picture

Changed the line lenghts to a maximum of 80 chars.

webevt’s picture

Status: Needs review » Needs work

Hi

PAReview scripts did not find any issues, that's good.

This module definitely needs more pretty project page :) Please take a moment to make your project page follow tips for a great project page. You can add a link to the simplytest.me page for testing purposes instead of giving a URL for downloading ZIP-archive with the module.

Manual review, minor issues:

  • There's a directory '1926096' in the repo.. It seems that it is not needed.
  • Function commerce_taxonomy_conditions_term_options_list(), line 106: it is not neccessary to set a first option for select element manually, you can use '#empty_option' parameter instead, see D7 Form API

I didn't managed to find other issues, your code is pretty nice.

Good luck

nonzod’s picture

Check the link to GIT repo.

give the ability to change the effect from UI (I hate fade :) )

$form['parameter']['term_field_names']['settings']['term_field_names']['#ajax'] = array(
      'callback' => 'commerce_taxonomy_conditions_term_options_list_form',
      'wrapper' => 'term-ids-replacement',
      'method' => 'replace',
      'effect' => 'fade',
    );
redsd’s picture

Status: Needs work » Needs review

Hi, Thank you all for the feedback.

I cleaned up my project page, trying to get a bit more overview.

I added the simplytest.me link to the project page, with a warning, because this module relies on a commerce module that is setup.

I removed the 1926096 directory.

I tried using '#empty_option', however it gives too much problems in combination with AJAX, so I reverted that option to the old way.

As for the fade, I rather keep it, since it's a good indication that something changed when you select a different vocabulary. I don't want to make an option for it, since this only used for the setup of the rules for the commerce option, and in that way almost never used. Making an setup page/option to choose the effect feels unneeded for such a small item.

kscheirer’s picture

Title: [D7]commerce taxonomy conditions » [D7] Commerce Taxonomy Conditions
Status: Needs review » Reviewed & tested by the community

Module looks nice, no problems or security issues found.

----
Top Shelf Modules - Enterprise modules from the community for the community.

redsd’s picture

Thank you :)

kscheirer’s picture

I guess my main question is why would I want to hook up shipping costs to taxonomy terms? Could you add something about that to your project page? Your implementation seems fine though, using rules is the preferred Commerce method. Do you need to implement all the operands? Using greater or less than with a tid doesn't seem very useful.

Thanks for your contribution, redsd!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

----
Top Shelf Modules - Crafted, Curated, Contributed.

kscheirer’s picture

Status: Reviewed & tested by the community » Fixed
redsd’s picture

Thank you very much kscheirer!

Taxonomy is used to create specific product, these products can then trigger special shipping costs.
It allows you to make specific rules for very specific products.

The greater en lesser then values are for the amount in the basket, so you can set the rule to only aply when the amount of that product with that specific taxonomy term is higher then 2, for example.

I will add this to the product description.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

added Pareview.