*renamed* How to show icon for checkout module?

jrossh21

Joined: 2007-05-30
Posts: 21
Posted: Mon, 2008-12-08 20:54

Just like the subject says, I'm wanting to always show the sidebar in the Carbon theme. I tried looking in a few places for an option, but couldn't find it. Anybody know of how to always show the sidebar?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2008-12-08 21:19

gallery2/themes/carbon/templates/local/sidebar.tpl <- copy the original here
line 6

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
jrossh21

Joined: 2007-05-30
Posts: 21
Posted: Mon, 2008-12-08 21:57

Thanks, you are exactly right - but whenever I remove the absolute positioning and the top and left numbers, it spawns at the bottom of the page and just looks bad. I guess a better question would be, how I can get the checkout module to show a little shopping cart icon underneath a photo like the cart module does? And another question about the checkout module ... is there a way for me to only show the "add photo to cart" to specific albums?

 
jrossh21

Joined: 2007-05-30
Posts: 21
Posted: Tue, 2008-12-09 16:28

Hopefully someone will be able to find this useful in the future.

If you are using checkout and checkout with paypal and want different icons and/or want the shopping cart icon to appear below or under a photo (like the cart module does), here's what you need to do:

1. In order to change the white square icon next to "Add photo to cart" in the sidebar (or under the thumbnails), do these steps:
- I'm not sure how to do this without the "icons" module (I like the way the silk ones look anyways), so download and install the icons module
- then go to gallery2/modules/icons/iconpacks/silk (or whichever you use) and edit icons.css and icons-rtl.css (I'm not sure what the difference is between these 2 files, so I changed them both - they look similar)
- near the bottom of both of these files is a section named "/* Commerce */"
- I copied the .gbLink-cart_AddToCart node and pasted it directly below, then changed it to .gbLink-checkout_AddToCart ... I also changed the image file it specifies from "add_cart.png" to "add_checkout.png"
- I then copied the file "add_cart.png" in that same folder and pasted and renamed the copied file to "add_checkout.png"
- wait a few minutes for the icon to propagate and you're good

2. In order to make the shopping cart icon appear below or under a photo (like the cart module does), do these steps:
- I'm not sure if you need to install the cart module at first and delete it, so I guess if the next steps don't work, try to download and install the cart module, then remove it
- then go to gallery2/themes/carbon(or whichever theme you use)/templates
- copy the navigator.tpl file onto your desktop or wherever you want to edit it
- edit the navigator.tpl file and search for "buttoncart"
- the line directly above that "buttoncart" line will read (if $itemLink.moduleId == "cart") ... change "cart" to "checkout"
- save the navigator.tpl file and move it to gallery2/themes/carbon(or whichever theme you use)/templates/local
- it should immediately appear, if not, give it a few minutes and you're good

** And also for those wondering, if you only want specific albums to have the "Add photo to cart" text and icons, you have to click on the album you want to edit, then click "Edit permissions" in the sidebar, then you have to click on "Remove" next to the "[checkout] Purchase item" permission (or add a new group permission, depending on what you want to do)