Detailed description

This module allows you to attach product specification data to any entity in Drupal 7. Mostly we can use this module to store product specifications on product display page. The form allows the user to add/remove number of rows and allows entry into each table cell using text / text area fields. Every node/entity can have multiple specification field. User can enter data by hand or by CSV upload. Specification fields are multi-value and revision capable. This module also has a sub module for specification bulk import. It allows user to select entity, bundle and field to import data. Please refer README.txt file before doing import, It has all the steps to generate the csv file.

Requirements

Product specification import module requires the following module:
* Entity (https://www.drupal.org/project/entity)

Project page

https://www.drupal.org/sandbox/mayurjadhav/2360057

A git clone command

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/mayurjadhav/2360057.git product_specification

Reviews of other projects

https://www.drupal.org/node/2359783#comment-9362861
https://www.drupal.org/node/2375161#comment-9360991
https://www.drupal.org/node/2378895#comment-9360649

https://www.drupal.org/node/2391791#comment-9432761
https://www.drupal.org/node/2392125#comment-9432861
https://www.drupal.org/node/2392971#comment-9433155

Comments

mayurjadhav’s picture

Issue summary: View changes
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.

nitesh pawar’s picture

Issue tags: +PAreview: review bonus

+1

ameymudras’s picture

Status: Needs review » Needs work

Hello Mayur,

I really like the idea of this module. I did review your module and here are the findings:

  1. On admin/structure/types/manage/*/fields/field_spec page in default value tab there is no file type restriction for csv upload. Also the field set disappears o2. n submit.
  2. On admin/structure/types/manage/*/fields/field_spec page if i click on the add one row. The field set disappeared.
  3. When i created a field and tried to import csv got warnings mentioned below and no file type condition.
    Notice: Undefined index: rebuild in product_specification_rationalize_table() (line 689 of /Applications/XAMPP/xamppfiles/htdocs/commerce/sites/all/modules/product_specification/product_specification.module).
    Notice: Undefined index: rebuild in product_specification_rationalize_table() (line 690 of /Applications/XAMPP/xamppfiles/htdocs/commerce/sites/all/modules/product_specification/product_specification.module).
  4. When i tried to add a row in the field got following warnings:
    Warning: Division by zero in product_specification_field_widget_form() (line 451 of /Applications/XAMPP/xamppfiles/htdocs/commerce/sites/all/modules/product_specification/product_specification.module).

Also a few suggestions:

  1. You can give the configure link to the module
  2. place the css file within a folder named css
nitesh pawar’s picture

Issue summary: View changes
sagar ramgade’s picture

Hi Mayur,

Thank you for your efforts, I did some manual review of the code however didn't install it yet. Please find my comments:

Automated Review

Review of the 7.x-1.x branch (commit e749f7a):

No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

Manual Review

Individual user account
[Yes: Follows] the guidelines for individual user accounts.
No duplication
[Yes: Does not cause] module duplication and/or fragmentation.
Master Branch
[Yes: Follows] the guidelines for master branch.
Licensing
[Yes: Follows / No: Does not follow] the licensing requirements.
3rd party assets/code
[Yes: Follows ] the guidelines for 3rd party assets/code.
README.txt/README.md
[Yes: Follows] the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
[Yes: Follows] the guidelines for project length and complexity.
Secure code
[Yes: Meets the security requirements.]
Coding style & Drupal API usage
[List of identified issues in no particular order. Use (*) and (+) to indicate an issue importance. Replace the text below by the issues themselves:
  1. (*)product_specification_field_schema needs to be .install file for it to be detected during installation and upgrade.
  2. (*) $form['#attributes']['enctype'] = 'multipart/form-data'; line no 315 in product_specification.module not needed as drupal already does that
  3. (*) check_plain not required as not user input on line no 366 in product_specification.module
  4. (*)Remove filter_xss_admin from line no 380, instead use check_plain on line no 363 in product_specification.module
  5. (*)$count_rows = count($default_value); can be removed as you assigning it a value next afterwards on line no 419 in product_specification.moudule
  6. (*)Use theme('table') instead table tags on line no 430 in product_specification.module
  7. (*)Line no 78 in product_specification_import.module, #access => user_access('administer specification import') not required as you are already using menu acess unless there is a seperate permission for this is required
  8. (*)Line no 165 in product_specification_import.module, use theme('item_list') instead of ul and li.
  9. (*)Line no 169 in product_specification_import.module, Do not use l() function, embed the HTML anchor tag directly in the translated string
  10. (*)Line no 170 in product_specification_import.module, make it translatable using t()
  11. (*)Line no 265 in product_specification_import.module, Do not query the file_managed table insteand use file_load

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

mayurjadhav’s picture

Status: Needs work » Needs review

Thanks Amey and Sagar,

I have resolved all the issues which you have mentioned in your post.

Updating status to needs review.

klausi’s picture

Assigned: Unassigned » misc
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

Review of the 7.x-1.x branch (commit 2e31389):

  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. project page is a bit short, see https://www.drupal.org/node/997024
  2. "variable_get('product_specification_csv_separator', ','),": all variables defined by your module must be deleted in hook_uninstall().
  3. product_specification_field_formatter_view(): to get the ID of an entity you can entity_extract_ids().
  4. The arg(0) hacks are less than ideal, why do you need them? What is the difference between admin representations and user representations?
  5. product_specification_import_form(): doc block is wrong, this is not a hook but a form building function. See https://www.drupal.org/coding-standards/docs#forms

But otherwise looks good to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

Assigning to MiSc as he might have time to take a final look at this.

mayurjadhav’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
mayurjadhav’s picture

Hi klausi,

Thanks for reviewing and reporting these issues. I have fixed all the issues.
Hoping to get the access soon.

misc’s picture

I will take a look this afternoon.

misc’s picture

Looks good to me.

misc’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -PAreview: review bonus

mayurjadhav, you have be granted git "vetted" status. Vetted users create full projects and promote existing experimental sandboxes. Welcome :-)

klausi’s picture

Pasting the approval template from https://groups.drupal.org/node/184389#promote

Thanks for your contribution, mayurjadhav!

MiSc updated your account so you can 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 stay 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.

Status: Fixed » Closed (fixed)

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