Closed (fixed)
Project:
Ubercart
Version:
7.x-3.x-dev
Component:
Cart/checkout
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Dec 2010 at 20:40 UTC
Updated:
11 Mar 2011 at 03:33 UTC
Jump to comment: Most recent file
Comments
Comment #1
tr commentedIf you want to change the name of the cart block you should change the "Cart name" on the block configuration page, not the "Block title". If you change "Block title" then Drupal is in control of what gets displayed there - not Ubercart - and Drupal doesn't know anything about the cart icon and the arrow to expand the block.
Changing this to a feature request - perhaps we can alter the configuration form so the "Block title" field which is automatically generated by Drupal doesn't show for the cart block.
Comment #2
tr commentedAnd here's a patch that implements what I suggested in #1 ...
Comment #3
longwaveSetting $block['title'] = FALSE when returning from uc_cart_block() op 'view' will override the default block title formatting, look at the latter half of the code in block_list() in block.module.
Perhaps the separate "cart name" field and variable should be dropped, leaving the default Drupal block title field, which we can then read from the database in uc_cart_block() and theme into $block['subject'], using $block['title'] = FALSE to force Drupal to always use our custom HTML for the title instead?
Comment #4
longwaveAttached patch does what I describe in #3, and includes an update function to move existing custom block titles into the standard block title field. Seems to make more sense to do things this way, than replace a perfectly good field with a custom one that in the end does the same thing, and saves one row in the variables table!
Comment #5
longwaveCommitted #3. Needs porting to 7.x.
Comment #6
longwaveCommitted the attached followup to 6.x which moves the block title re-theming to hook_preprocess_block() which seems a bit cleaner.
Comment #7
longwaveCommitted the attached patch to 7.x.
Comment #9
whatsanike commentedI have the problem described because I changed the title. Only what I don't know is how to implement the patch. I have drupal 7.0. I can edit the file in question through the cPanel file manager, but I don't know where to put the code or which code to delete! Could someone just clue me in on where to paste the code, or if there is a way to compile the patch into the file?