Closed (fixed)
Project:
Ubercart Out of stock Notification
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Aug 2009 at 14:43 UTC
Updated:
8 Oct 2011 at 20:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
hanoiiSorry that I took a while to answer. You are right about pointing out that giving a way to override that function is useful. I might change it to a theme_xx() function sometime in the future. Thing is that the function handles different error messages depending on the error and if the product has attributes or not.
There is, however, something you can do. Those errors are enclosed with t() for translation. I use this trick quite a bit to modify this kind of strings, which is by enabling the locale module and create a new language (EN-special). By doing that you can 'translate' any string into whatever you want, and by translate it doesn't necessary mean another language, just another string. Strings that are not 'translated' would be displayed as default.
Comment #2
pieterdcThe attached patch allows other modules to extend / alter the error message.
I, for example, use something like this (in a custom module) :
Comment #3
hanoiinice way of doing it. thanks.