Hi,
My scenerio is as follow:
I have two type of products which are Donation and RSVP for an event.
I already use string override to replace the string in ubercart modules so that the whole order process match with "Donation Language" such as:
Add to cart => Donate
Shopping List => Donation List
Continue Shopping => Continue Donate
Update cart => Update Donation List
Order Total => Dontion Total
Review Order => Review Your Donation
Submit Order => Submit Donation
Etc.
This has been working great!
Now I do need to add other types of product of a totally different than the current donation. These types are for an event registration. I need to make it so that the language also match with RSVP (reservation)
Add to cart => RSVP
Shopping List => RSVP List
Continue Shopping => Continue RSVP
Update cart => Update RSVP list.
etc.
Does any module go with ubercart support this or is there any way around to achieve this?
Thank
Comments
Comment #2
TR CreditAttribution: TR commentedIf you want your string alteration to depend on a variable such as product type, then you have to write custom code. A simple hook_form_alter() should be sufficient - this is very simple and there are many examples of how to write a small module that does a hook_form_alter(). See for instance http://www.ubercart.org/comment/8749, which is for Drupal 6 but it's a complete example that is very close to what you will need to do.
Comment #3
truyenle CreditAttribution: truyenle commentedThank you for response TR.
I am familiar with hook_form_alter() but in this case after use click on "Add to cart"=> users will be redirect to the same forms with IDs "uc_cart_view_form" and then "uc_cart_checkout_form" regardless to product types. So if I alter these forms it should affect all products check out though?
Did I miss anything?