[zen cart] Integration Templates.


Joined: 2005-11-04
Posts: 1642
Posted: Sat, 2006-12-09 21:04

************UPDATE 22 OCT 2007**********
Please refer to here for up to date file links

************V2.1 - 15 Jul 2007*************
1) Fixes some issues with display

You can get the zip file here.

Unpack into your ZC folder and then activate whichever one you want in ZC Admin.

************V2.0 - 14 Jul 2007*************
1) Tightened the level of integration. Users can now return to the page they were viewing in G2 from anywhere in ZC by clicking on the "Gallery" link
2) Rationalised some of the breadcrumb displays

Following packs released
PGSnow, PGCharcoal & PGBrown.

I called them PGxyz but will work with any G2 Theme/Colorpack just that it will fit PGTheme Colorpacks best or X_Treme to a slighty lesser degree.

************V1.1 - 11 Jul 2007*************
Fixed cosmetic issues.

I have also attached a mod of the module that allows permissions to be set. Make sure you rename your modules.inc file first before unpacking the attached zipfile in your main ZC folder.

Hope someone finds useful.

************V1.0 - 18 Dec 2006*************
Here is a template derived from Darren Scott's TrekViews zen cart template that provides a fuller level of integration of ZC and G2. Made to look like the PGTheme colorpack, PGSnow with a few outstanding issues to be sorted later.

Should work with other themes anyway.

Some changes to font colours will be applied later.

Unpack to your ZC folder.

Gallery Version: 2.2.2
Gallery Theme: PGTheme 1.2.0
Web Site: http://dakanji.com

zcg2_allow_perms.zip4.71 KB
Kevin Logan
Kevin Logan's picture

Joined: 2006-07-06
Posts: 51
Posted: Fri, 2007-02-09 19:32

Hi Dayo,
I am working with your templates. All is going OK (and well done with the templates BTW), but I have one goal that I am having trouble with.
My goal is for the user to always be able to return to Gallery, same spot they came from. This seemingly requires the $galleryReturn varible. I am successfully altering the templates except for either of these 2 scenarios:
1. An item is added to the cart, then deleted or quantity updated. The template(s) no longer seem to know about $galleryReturn (even though I have it added in the default cart page & the header template), and the only option available is going to the zencart index page, OR the home page of my domain. The option of going back to the point of origin is no longer available.
2. As far as I can tell, the person who wrote the zencart module for Gallery, never anticipated the possibily of someone checking an empty cart OR to have added one item, go back to Gallery to POSSIBLY shop some more, ultimately deciding NOT to add any more items (therefore there has to be a link in Gallery to the shopping cart to allow them to THEN Checkout). I have a link in my breadcrumb line "to View Cart" and to solve the problem that this link seemingly passes no "Return" information for $galleryReturn to use, I decided to make this link target_blank, and I am trying to figure out a way to have the necessary "continue" button visible. Currrently one of continue buttons is a close.window. and should only be visible if a user entered to check the cart and it is empty. The second continue button ideally should be a link BACK to the page of origin in gallery. IF I can make this button get the $galleryReturn info, I would then dispense with the target_blank and window.close approach.
Have a look here, and I think this will make my post make more sense:
Here you see the 2 continue buttons. ALso there, but not visible is a "Return To Gallery" link that is not showing up, simply because it does not have the $galleryReturn info.
To sum up, my goal is the make the entire cart process be able to go BACK to the page of origin IN Gallery, never defaulting to the zencart Index page.
So, any ideas?
Cheers & all the best,

Gallery version = 2.2-rc-1 core 1.1.26
PHP version = 4.4.4 cgi
Webserver = Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/ mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
Database = mysqlt 4.1.21-standard, lock.system=flock
Toolkits = ArchiveUpload, LinkItemToolkit, Thumbnail, Gd
Acceleration = none, none
Operating system = Linux autumn.estarr-8.com 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 18:00:32 EDT 2006 i686
Default theme = PGtheme
gettext = enabled
Locale = en_US
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Rows in GalleryAccessMap table = 31
Rows in GalleryAccessSubscriberMap table = 106
Rows in GalleryUser table = 2
Rows in GalleryItem table = 103
Rows in GalleryAlbumItem table = 5
Rows in GalleryCacheMap table = 0


Joined: 2005-11-04
Posts: 1642
Posted: Sun, 2007-02-11 19:16


Point 1: You are correct on this issue and it is something I have ticked down to sort out at some point. My cart is not yet live but in is current setup, is geared to return the user back to the G2 main page.

Point 2: The return url is simply not passed across so your view cart link is no different to the main purchase options link. As you have figured, it is to do with the way the integration was done.

I think the variable g2_return needs to be loaded but I haven't been able to find my way round the documentation since it was upgraded to check lol.
Gallery Version: 2.1.2
Gallery Theme: PGTheme 1.1.0 (RC01)
Web Site: http://dakanji.com

Kevin Logan
Kevin Logan's picture

Joined: 2006-07-06
Posts: 51
Posted: Tue, 2007-02-13 12:59

Hi Dayo,
Thanks very much for replying.
So basically, I guess my dream come true requires the ZenCart G2 module to be modified, something for sure beyond my wildest dream of doing myself, or affording ($$$) someone to do it for me. I think I will email the original author (Michael Rodriguez-Torrent) of the module and see if it's possible for him to get re-involved in the development of the module, OR if he's even interested in my ideas at all.
However, one issue that is still preplexing me, I think, is a zencart issue. I have $galleryReturn valid, until either "delete" or "update". My naive guess is that in this process of product ID dumping, $galleryReturn is also getting lost.
For now, I will live with returning to the main page in the few instances that it occurs. Sure would be nice if it worked perfectly though.
I thank you VERY mcuh for your input though. You have at least put to bed the issue for me, as I know it's not my lacking of knowledge, but just programming that doesn't quite fit my idea(s).
Cheers and all the best,
PS: I must add to this how MUCH I appreciate your efforts on the theme & templates for the ZenCart integration. IMHO ZenCart is the only shopping cart I would use for G2, given the options for carts so far for G2. ZenCart is a very powerfull shopping cart, and without your work, I would seriously be in the deep end of the pool. Again, cheers!!!