i made another post, but maybe it should be moved here instead? not sure..
But i have a checkout module on a photo store.. and instead of ADD PHOTO TO CART, i would like to rename that line to say "ADD ITEM TO CART" instead. Is there a simple way i can do this? I have a testing site to try out.. just looking for a few tips from the experts here or even alex himself!HAHA
thx
Posts: 4342
'photo' and 'Photo' are defined in modules/core/classes/GalleryPhotoItem.class line 193 (for G2.3)
If you want to keep 'photo' elsewhere though, and *just* change the 'Add photo to cart' then edit modules/checkout/module.inc line 859/860 from
to
Although this will mean that albums also have "Add Item to Cart" (if you have add Album to Cart enabled). Also, either change may screw up the translations for this command.
Who is this Alex of whom you speak?
Posts: 31
Thanks man! oh, sorry, i meant Alec.. meaning YOU.. lol. you helped me out before last fall..
I wasnt aware that we could have "Add Album to Cart" disabled.. i will have to look for that..
So its safe to make this change from "photo" to "item"? what do you mean by the translations for that cmd getting screwed up.. thx for replying
Posts: 4342
It's a separate permission - if you have assigned it, you get "add album to cart" under albums. If you haven't assigned the permission it won't appear.
The translation system looks for the text as it appears originally in the module. Suppose your language is German, then there's no translation for the exact text "Add Item to Cart" so it won't be translated and so will appear in English. Possibly in the middle of a page full of German. There is a translation for "Add %s to cart" and (probably) also a translation for "Item", but not for "Add Item to Cart" as a single piece of text.
Of course if you don't care about foreign languages (most of the translations for checkout don't exist anyway) then it doesn't matter.
Posts: 31
Thanks Alec! it worked. However, can you tell me where the option is to turn off "Add album to cart" on the gallery..Since i made the changes i wanted with having "item" in place of "photo"....it now says ADD ITEM TO GALLERY where it used to say add "album".... dont think i want that..
Posts: 4342
IT's permission based. Unless the user has the "[checkout] purchase album" permission on the album it doesn't appear. (I think it appears always for admins, as you have all permissions, ex-officio.)
Posts: 31
thx again alec.. its been working great!