CVS edit link for qinwubi

after a lot of searching and digging in drupal.org I found out that there's currently no modules that enhance ubercart's core attributes & options functionalities in the following way:
1) establishes dependencies between attributes;
2) establishes dependencies between specified options and attributes;
3) by establishing the above dependencies, the selection/deselection of certain options in certain attributes results in the enabling/disabling of their depending attributes/options.

So I developed my own module that does the job. I call it Chained Attributes aNd Options (CANO). I'd like to share it in the drupal community. Please consider my application. Thanks!

Wubi

CommentFileSizeAuthor
#1 cano.zip4.52 KBqinwubi

Comments

qinwubi’s picture

Assigned: Unassigned » qinwubi
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new4.52 KB
avpaderno’s picture

Assigned: qinwubi » Unassigned
Status: Needs review » Needs work
Issue tags: +Module review

Hello, and thanks for applying for a CSV account.

As per requirements, may you describe with more details the purpose of the proposed module?

qinwubi’s picture

Ok. Here's an example. An apaprel shop offers a Tee. It has threee attributes: a) Color; b) Size; c) Measurements

Disableing/enabling certain attributes/options based on earlier selected combination of attributes/options;
Scenario: there's a Custom Size option in Size; it's desirable to show the Measurements attribute ONLY when customers select Custom Size. In this case, shop admin can define c)'s dependency on the Custom Size option of b); Further, this definition is per product class, that is one can define different dependency rules for different ubercart product classes.

Currently there's the http://drupal.org/project/uc_dependent_attributes module which is able to disable option combinations on per product basis. But it can be obviously extremely tedious if a shop has many products. My module defines the product class level attributes/options dependency.

Let me know if you need more clarifications.

avpaderno’s picture

Status: Needs work » Needs review

Thanks for your reply.

qinwubi’s picture

Any updates so far?

dave reid’s picture

Issue tags: +Ubercart

Would be great to have someone with Ubercart experience reviewing this application.

qinwubi’s picture

@Dave:
The project is currently live in ubercart.org:
http://www.ubercart.org/project/uc_cano

Currently there're a few minor issues pending to be fixed, which is primarily source encoding issues. There're already quite a few installations and they worked. Users like the module and considers it attractive and useful.

ps. Why my project repository account is still not approved? Is it normal or I'm just unlucky?

pcambra’s picture

Hi qinwubi

Wouldn't be possible to join efforts with the mantainer of uc_dependent_attributes and having the ability of set dependencies at class AND product basis with one module only?

Took a quick look to the module, the issues I've noted below aren't sorted by importance and some of them can be blocking and others not, please revise the main guidelines of what to expect when applying for a CVS account http://drupal.org/node/539608

  • You need to include a README.txt file with the instructions for install (if there is something special to do), and the features and instructions of the module.
  • Folder has to be named like the module (i.e. uc_cano)
  • All files need to have CVS headers, please see http://drupal.org/node/546
  • All php files should include a @file doc information
  • css file included in the module has only one empty property
  • Instead of document ready for js file, you should check Drupal behaviours instead, please see http://drupal.org/node/205296
  • In db_query, only the '%s' should be enclosed in single quotes, revise at least uc_cano_form_alter function and take a look to
  • Please run your module through coder so you can see easily most of the standards you should accomplish: http://drupal.org/project/coder
  • All functions in the .module and admin.inc file should be docummented
  • Instead of drupal_render the form for uc_cano_definitions, you should invoke the function in the hook_menu using drupal_get_form, something like this:
      $items['admin/store/settings/cano/definitions'] = array(
        'title' => CANO Definitions,
        'page callback' => 'drupal_get_form',
        'page arguments' => array('uc_cano_definitions'),
        'access arguments' => array('administer cano configuration'),
        'type' => MENU_DEFAULT_LOCAL_TASK,
        'file' => 'uc_cano.admin.inc',
        'weight'           => -11,
      );
    

    This way you avoid the need of using drupal_render and uc_cano_definitions should only return the form array.

  • You should remove the t() call from title in the hook_menu. See http://api.drupal.org/api/function/hook_menu/6
pcambra’s picture

Status: Needs review » Needs work
summit’s picture

Subscribing, isn't uc_cano on drupal.org?
greet module! greetings, Martijn

avpaderno’s picture

Status: Needs work » Closed (won't fix)

There have not been replies in 3 months, and the points reported by pcambra still need an answer.

avpaderno’s picture

Component: Miscellaneous » new project application
Issue summary: View changes

Please read the following links as this is very important information about CVS applications.