ZenCart Module

nospamisgoodspam

Joined: 2005-08-31
Posts: 40
Posted: Fri, 2005-10-28 07:29

I have been trying to get the ZenCart module running on another gallery2 I have been using and have had some errors popping up in strange places.

  1. Setting a highlight for an album
  2. Renaming the root album

Hack warning:
It would be really nice if the author could look at these things

file:
modules/ZenCart/module.inc

line:
370

after:
list ($ret, $dataItem) = GalleryCoreApi::loadEntitiesById(
                                $entity->getDerivativeSourceId());
if ($ret->isError()) {
    return array($ret->wrap(__FILE__, __LINE__), null);
}

before:
$zenCart = new GalleryZenCart();
$ret = $zenCart->init('AdminMode');

code:
//The code here didn't seem to be getting the right object when assigning a Highlight to an album so i just looped
//until i got an item that wasn;t a derivative.
while(GalleryUtilities::isA($dataItem, 'GalleryDerivativeImage'))
{
	//print_r($dataItem);
	list ($ret, $dataItem) = GalleryCoreApi::loadEntitiesById($dataItem->getDerivativeSourceId());
	if ($ret->isError())
	{
		return array($ret->wrap(__FILE__, __LINE__), null);
	}
}
file:
modules/ZenCart/classes/ZenCart.class

line:
1238

code:
//Commented out this block as values of 0 being returned were causing errors, I think the check on the previous
//line should catch any major problems
if(!$zenParentId)
{
	...
}
 
nospamisgoodspam

Joined: 2005-08-31
Posts: 40
Posted: Tue, 2005-11-08 06:14

Does anyone have any experience with this module?

I seem to have another problem with creating links in another folder, ZenCart thinks this is a new item instead of a copy of an existing item.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-11-08 15:31

the author of the module is notified. we'll see if he has time to help you sort this out...

 
nospamisgoodspam

Joined: 2005-08-31
Posts: 40
Posted: Wed, 2005-11-09 04:31

cheers valiant, hopefully this will be sooner than later...

 
mrtorrent

Joined: 2005-01-04
Posts: 23
Posted: Wed, 2005-11-09 23:25

Sorry, I've been really busy the past week and a half with mid-term projects. My last one is due tomorrow, so after that I'll be relatively free for a little while and will respond properly. Sorry about the bugs!

 
mrtorrent

Joined: 2005-01-04
Posts: 23
Posted: Mon, 2005-11-21 20:38

Hi there, sorry again for taking so long! I made a couple fixes to the code yesterday, including the "set highlight" bug you were experiencing. Please download the latest code from http://sourceforge.net/project/showfiles.php?group_id=142706&package_id=170252 and see how it works for you! The best thing to do would be to install it from scratch.

Let me know,
Mike

 
kuku.lele

Joined: 2005-07-16
Posts: 5
Posted: Wed, 2005-12-07 12:57

hello mrtorrent,

i instaled your integration pack and it works fine. As i am not very familiar with zencart or level of integration between zc and g2, can you tell is it possible to have private categories in zc, same as i have private galleries in g2?

 
mrtorrent

Joined: 2005-01-04
Posts: 23
Posted: Wed, 2005-12-07 14:10

Hello,
No, I don't think Zen Cart has any facility for per-category permissions. AFAIK, a category is available to everyone (enabled) or to no one (disabled).

 
kamikazi

Joined: 2005-06-10
Posts: 80
Posted: Fri, 2006-01-06 19:18

Where do I get the Zen Cart module? Does it allow for unique prices for each image?

 
kamikazi

Joined: 2005-06-10
Posts: 80
Posted: Fri, 2006-01-06 20:58

I found it! Can ZenCart and Gallery2 share the same database? The installation notes say "". But Im affraid it will overwrite my gallery tables. When I load Zencart into teh Gallery database will it write new tables or will it mess up my existing tables? Thanks... I'm still debating whether I want to run Zencart as a standalone subsite or integrate it into G2. Any tips or advice would be appreciated.

 
kamikazi

Joined: 2005-06-10
Posts: 80
Posted: Fri, 2006-01-06 23:01

I email the author; although opon examination of ZenCart, it seems like the scripts are designed to sync up tabels in the same database. I'm just leary of ZenCarts installer writing over the Gallery 2 tables. I'll ask the author if this is an issue and I'll post my findings here on Monday.

 
mrtorrent

Joined: 2005-01-04
Posts: 23
Posted: Sat, 2006-01-07 18:53

Neither application should touch the other's database. The installer for each gives you the option to use a table prefix. Fill out something different for each to help ensure that the table names stay unique.

 
kamikazi

Joined: 2005-06-10
Posts: 80
Posted: Mon, 2006-01-09 17:33

Thats what I suspected. So I'll install ZenCart in its own database and and use unique table prefixes. Thanks Mike!

 
mrtorrent

Joined: 2005-01-04
Posts: 23
Posted: Mon, 2006-01-09 19:31

Sorry, I've just realized I worded that incorrectly. What I meant by "Neither application should touch the other's database" is that I'm pretty sure that the applications don't use any of the same table names, so you shouldn't have a problem, but you should definitely use unique table prefixes in order to be sure. This is if they are both in the same database, as per the ZCG2 instructions. Although they can be in separate databases if you like, with a minor workaround (use a different MySQL user; see ZenCartAbstraction.class:138).