Needs review
Project:
Edit term
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Apr 2008 at 02:18 UTC
Updated:
19 Jul 2009 at 23:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
mlncn commentedThanks for this...
I haven't tried the code, so forgive me if I'm way off, but doesn't Ubercart category use pathauto to give different URL aliases without changing the internal taxonomy path?
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/ubercart/uc...
benjamin, Agaric Design Collective
Comment #2
Eugene Fidelin commentedI add this code in function edit_term_menu
Comment #3
OliverColeman commentedRe #1: Nope, it uses its own rendering system for catalog terms: catalog/tid will render term tid using ubercarts theme function, taxonomy/term/tid will render the same term with taxonomys theme function.
Comment #4
jameslov commentedI'm trying to get this working for Ubercart2 and Drupal6. I added this code to edit_term.module at line 109:
// Add an edit tab to ubercart catalog pages also
$items['catalog/%/view'] = array(
'title' => t('View Catalog Group'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 0,
);
$items['catalog/%/edit-term'] = array(
'title' => t('Edit Catalog Group'),
'page callback' => 'edit_term_edit_taxonomy_term',
'page arguments' => array(2),
'access arguments' => array('administer taxonomy'),
'file' => 'taxonomy.admin.inc',
'file path' => drupal_get_path('module', 'taxonomy'),
'weight' => 1,
'type' => MENU_LOCAL_TASK,
);
And this line at 138 (not sure if its necessary):
$items['catalog/']['type'] = MENU_CALLBACK;
At this point the tabs show up as they should, but when I click on the edit tab I get the 'Failed to load term' error.
The site I'm working on, and a specific example can be viewed here: http://waldenheightsnursery.com/catalog/7/edit-term
If someone could help me get this working, suggest a fix I may have missed, or point out an easier approach, I would greatly appreciate it! I attached the file I was working on.
Thanks in advance,
JamesL
Comment #5
jameslov commentedFYI I'm going to turn off the Ubercart catalog and use normal taxonomy with views so that I can use edit term.
Comment #6
edrex commentedit seems that the ideal solution would be to have ubercart use the normal taxonomy term pages, and just override the display. Then any taxonomy links in views, node links etc would go to the catalog. I'm not sure why they didn't do this in the first place. I think I'll try to go this route, theming the taxonomy pages to look like the catalog. Has anyone done this already?
Comment #7
edrex commentedI added the following code in my theme to have ubercart render taxonomy pages:
template.php:
Note this is a hack:
Easy enough to adapt.
Comment #8
edrex commentedi wanted to keep using the catalog root page (i'm very lazy) so I add the following to settings.php to rewrite catalog/.* urls to point at the taxonomy term: