Zen Cart Logo
Forums / All Other Contributions/Addons / Just another Cross-Sell mod (support thread)

Just another Cross-Sell mod (support thread)

Views: 133,968

Results 221 to 240 of 704
4 Jun 2008, 9:50 PM
#221
karma_lab avatar

karma_lab

Zen Follower

Join Date:
Apr 2008
Posts:
135
Plugin Contributions:
0

Just another Cross-Sell mod (support thread)

Hi,
This looks interesting and I'm thinking of installing it to 1.3.8a, but are people successfully using this with 1.3.8a? The last two posters have problems, and there was no answers to them...

Thanks!

4 Jun 2008, 11:38 PM
#222
karma_lab avatar

karma_lab

Zen Follower

Join Date:
Apr 2008
Posts:
135
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

OK, so I went ahead and tried to install this. I am now having the same error as 'cartguin' above, which is:

Fatal error: Call to undefined method yclass::init_template() in /home/user2000/public_html/zencart/admin/module_manager.php on line 14

First, I installed the latest version of module manager (module_manager_rev15.zip) according to instructions. That went fine, when I went to Tools > Module Manager, it showed that it was properly installed.

So then I have carefully installed the latest version of cross sell advanced (cross_sell_advanced_rev185.zip), and when I go to the Module Manager, I get the above fatal error.

Question: when it says to renamed the files i.e.:

2. Make sure to change the name of the following directories (from the ZIP) to match your template name:
    /includes/modules/YOUR_TEMPLATE 
    /includes/templates/YOUR_TEMPLATE 
    /includes/languages/english/YOUR_TEMPLATE

...does it mean to match the name to the current template's folder's name? In other words, my template lives inside a folder named:

/includes/templates/theme033

So I would named the above folders to (before uploading)?:

    /includes/modules/theme033 
    /includes/templates/theme033 
    /includes/languages/english/theme033

That is what I have done, anyway, it's not working. Any help would be greatly appreciated!

6 Jun 2008, 6:46 PM
#223
ladyink avatar

ladyink

Zen Follower

Join Date:
Oct 2007
Posts:
105
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

Well, Now I have the very same issue. I'm getting error:

Fatal error: Call to undefined function: init_template() in /catalog/admin/module_manager.php on line 14

I installed Module Manager and then Cross Sell. (I did have to create the .keep file.) I got Cross Sell installed and then it would not take any model numbers that I tried to enter. I decided to see if there was and issue with Module Manager. That's when I found the error. Since then, I have installed all three SQL patches (Through Tools/ Install SQL Patches)- (The third one failed and said there were duplicates)

Now, I can get the model numbers to "take" but it's not showing up- That's my next project!!

I'd like to either- get rid of module manager or figure out how to get rid of the error. I'm making this site for someone else and I really don't want the error there!

Thanks!

9 Jun 2008, 12:15 AM
#224
griff1324 avatar

griff1324

New Zenner

Join Date:
Feb 2008
Posts:
48
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

ladyink:

Well, Now I have the very same issue. I'm getting error:

Fatal error: Call to undefined function: init_template() in /catalog/admin/module_manager.php on line 14

I too am experiencing this problem. I am testing this on my local machine using XAMPP. I believe that I have narrowed it down to the init_yclass.php file.

When I first install Module Manager everything installs and works perfectly. Then when I install the Just Another Cross-Sell Module, overwriting the config.yclass.php and init_yclass.php files, I get the error mentioned above. However, if I don't overwrite the two mentioned files, then it "appears" to work properly.

I then did some digging into the files and noticed that the confi.yclass.php files that are in the Module Manager and the Cross-Sell Module are identical. However the init_yclass.php files are different.

Here is what the init_yclass.php file contains for the Module Manager:

<?php
	require_once(DIR_FS_CATALOG.'includes/init_includes/init_yclass.php');
?>

Here is what the init_yclass.php file contains for the Just Another Cross-Sell Module:

<?php
	// y stands for yellow1912 :p. I simply add this to store all the functions frequently used in my mods
	
	// PHP4 always pass object by value (default) while PHP5 pass by reference
	if (version_compare(phpversion(), '5.0') < 0) {
	    eval('
	    function clone($object) {
	      return $object;
	    }
	    ');
	}
	
	class yclass{
		function db_result_to_string($glue, $db_result){
			$temp_array = array();
			if($this->is_obj($db_result,'queryFactoryResult')){
				// We need to clone, because we don't want to touch the real object
				while(!$db_result->EOF){
					$temp_array[] = $db_result->fields['products_'.XSELL_FORM_INPUT_TYPE];
					$db_result->MoveNext();
				}
				$db_result->Move(0);
				$db_result->MoveNext();
			}
			
			return implode($glue,$temp_array);
		}
		
		// This function does not work for all languages! BEWARE
		function array_to_upper(&$entries){
			foreach($entries as $entry){
				$entry = strtoupper($entry);
			}
		}
		
		// http://us3.php.net/manual/en/function.is-object.php#66370
		function is_obj( &$object, $check=null, $strict=true ){
			if (is_object($object)) {
		    	if ($check == null) {
		        	return true;
		      	} else {
		        	$object_name = get_class($object);
		        	return ($strict === true)?( $object_name == $check ):( strtolower($object_name) == strtolower($check) );
		      	}   
		  	} else {
		    	return false;
		  	}
		}
	}
?>

Why is it that when I write over the init_yclass.php file that the Module Manger with the one from the Just Another Cross-Sell Module, I receive the error mentioned above? I was assuming that this file should be written over once we copy the Just Another Cross-Sell Module files over into our installation.

I am confused on the proper way to install this module and I would greatly appreciate any help on how to do this install.

Thanks,

Chris

9 Jun 2008, 7:19 PM
#225
ladyink avatar

ladyink

Zen Follower

Join Date:
Oct 2007
Posts:
105
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

Well, I guess that I should have added this... I got everything to work once I installed the Cross Sell Original Module first and then basically upgraded it to the Cross Sell advanced.

It might help??
Nancy

12 Jun 2008, 8:47 PM
#226
karma_lab avatar

karma_lab

Zen Follower

Join Date:
Apr 2008
Posts:
135
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

How exactly did you do that?

12 Jun 2008, 10:08 PM
#227
karma_lab avatar

karma_lab

Zen Follower

Join Date:
Apr 2008
Posts:
135
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

I just spent 3 hours looking into this further and trying to fix the problem, and I cannot get it to work.

I find it distressing that the creator of the mod fails to respond. I understand that no support is guaranteed, but 3 or 4 people with the same problem shows that something is slightly different on the developer's system. On his system, the yclass or _yclass is being properly instantiated; on ours, it is not.

I don't know enough about the inner workings of Zen Cart to get further than that.

Does anyone know how to go about uninstalling this mess?

13 Jun 2008, 4:10 PM
#228
griff1324 avatar

griff1324

New Zenner

Join Date:
Feb 2008
Posts:
48
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

I tried installing the Cross Sell Mod first and then installing the Just Another Cross-Sell Mod (overwriting any files it asked) and I still continue to get the error.

I am doing all of this on my local machine running XAMPP so that I can properly test before installing it on my live store.

Any ideas what is going on?

Thanks,

Chris

13 Jun 2008, 6:03 PM
#229
ladyink avatar

ladyink

Zen Follower

Join Date:
Oct 2007
Posts:
105
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

I wish I could explain, what I've done, a little better. I'm just not that good at this stuff- however, I'm starting to keep better notes.

The only other thing I did was remove the files for the module manager- it was annoying me. I just installed the sql patches through the admin, like everything else.

Let me know if that helps- I'll add it to my notes for future ref!

Nancy

17 Jun 2008, 4:33 PM
#230
batteryman avatar

batteryman

Zen Follower

Join Date:
Jul 2004
Location:
Las Vegas
Posts:
327
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

Hello,

I have a small dilema. I cant figure out how to use the Cross Sell 1-way, which makes me feel kinda stupid. In the instruction it says.

I. To cross-sell 1 way (B to A, C to A. In other words, when customer views A they will see B and C but not vice versa):

Check the box "Cross sell 1 way only?"

Using our example above, A should be entered in the upper box amd B,C should be entered in the lower box.

But what is considered the upper and lower box. I have tried a few gifferent things but I keep getting the same error.

Please input main product's id

Can anyone explain it a little more to me?

Other than that the mod is working and looks great.

Here is an example of it working on my site

http://www.batteriesinaflash.com/index.php?main_page=product_info&products_id=891

User of zencart

9 Jul 2008, 4:00 AM
#231
tbaquatics avatar

tbaquatics

New Zenner

Join Date:
Jan 2008
Posts:
72
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

Any ideas

Not Found
The requested URL /shop/admin/xsell_products.php was not found on this server.

9 Jul 2008, 4:27 AM
#232
karma_lab avatar

karma_lab

Zen Follower

Join Date:
Apr 2008
Posts:
135
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

Perhaps, instead of fixing all the problems that users are having, or even responding to them, the author has simply decided to remove it.

15 Jul 2008, 8:17 PM
#233
dcrosbie avatar

dcrosbie

New Zenner

Join Date:
Jan 2008
Posts:
18
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

cartguin:

I'm having a problem with Just Another Cross Sell in conjunction with the Modules Manager mod. I receive the following error:

Fatal error: Call to undefined method yclass::init_template() in /zentest/admin/module_manager.php on line 14

This error occurs after a correct, working installation of modules manager AND after installing the cross-sell mod AND when I click on Admin > Tools > Modules Manager, which I try to do because I cannot see Admin > Configuration > Cross Sell.

What troubleshooting avenues should I pursue?

I was having this same problem. I couldn't figure out what the probem was, and I didn't want to spend time on it, so here is how I fixed my problem.

  1. Uninstall Module Manager (just remove the files and the module_version_tracker table it created)
  2. Install Cross sell mod as per instructions
  3. manually run the SQL files for cross sell to install the tables and config entries into the DB. The SQL files to run are located in the cross sell mod at admin\includes\module_installation\ri_jaxs\db. I ran 0.sql and 1.sql because 2.sql contained SQL that was already in 1.sql

So this seems to have fixed my problems. I can now to cross sell as expected.

17 Jul 2008, 7:49 AM
#234
nguyenkhv avatar

nguyenkhv

New Zenner

Join Date:
Feb 2008
Posts:
35
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

Need help with J Another Xsell mod:

My systme: ZC 1.3.8a, with Xsell mod and Xsell Advanced mod, and Cart Usell/Xsell Mod installed. Works very well.
The system also has Module Manager installed.

After I installed the latest
Just another Xsell Mod. (replacing most of the old files with new files, I dont see any SQl patch come with the JAN Xsell mod, so I assume there is no DB modification)

Problems:

  1. I cannot see
    Admin->configuration->cross sell
    (I have checked all thrid party modules in Admin Profile)

  2. in the Catalog/Advanced Cross Sell:
    I got this:
    Product Cross-Sell applies to:
    Product XSELL_FORM_INPUT_TYPE(s):

  3. I go to Tools/module manager
    I got this error:
    Fatal error: Call to undefined method yclass::init_template() in /home/gotwovie/public_html/adminspace/module_manager.php on line 14

ANy one has any idea? please help.
thanks,

17 Jul 2008, 8:58 AM
#235
nguyenkhv avatar

nguyenkhv

New Zenner

Join Date:
Feb 2008
Posts:
35
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

Never mind the above post, I forget to install SQL patches from the manger module folder.
My mistake. Sorry.

Every thing works well
except:
Before installing Just Another Xsell mod, I was able to set the number of xsell products display : default is 6, but I was able to increase it to 30 under the Admin/Config/Maximum values.

Now, the old setting is gone, and I get a default display of 6 even though I cress sell more than 6 items.

Does any one know how to fix it?
Thanks,

17 Jul 2008, 9:24 AM
#236
nguyenkhv avatar

nguyenkhv

New Zenner

Join Date:
Feb 2008
Posts:
35
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

I got it to work. Just reinstall the SQL patches.

I still have the error accessing Module Manager:
Fatal error: Call to undefined method yclass::init_template() in /home2/gotwovi1/public_html/adminspace/module_manager.php on line 14

30 Jul 2008, 11:38 AM
#237
dantes avatar

dantes

New Zenner

Join Date:
Jul 2008
Posts:
6
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

dcrosbie:

I was having this same problem. I couldn't figure out what the probem was, and I didn't want to spend time on it, so here is how I fixed my problem.

  1. Uninstall Module Manager (just remove the files and the module_version_tracker table it created)
  2. Install Cross sell mod as per instructions
  3. manually run the SQL files for cross sell to install the tables and config entries into the DB. The SQL files to run are located in the cross sell mod at admin\includes\module_installation\ri_jaxs\db. I ran 0.sql and 1.sql because 2.sql contained SQL that was already in 1.sql

So this seems to have fixed my problems. I can now to cross sell as expected.

I found the solution:

in your zen-cart root directory:

substitute the file:
"<zen-cart-root>/admin/includes/init_includes/init_yclass.php"

with the version from:
<zen-cart-root>/includes/init_includes/
<DONE>

(i.e. copy "init_yclass.php"
from "<zen-cart-root>/includes/init_includes/"
to "<zen-cart-root>/admin/includes/init_includes/")

30 Jul 2008, 12:24 PM
#238
dantes avatar

dantes

New Zenner

Join Date:
Jul 2008
Posts:
6
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

OK, I discovered that the module manager has the proper "init_yclass.php" file down in "admin/includes/init_includes/" initially,

but when you install the *Cross Sell * module, that version of the file gets overwritten with some old version.

So, apply the fix I just posted above AFTER installing the Cross Sell module rev185.

:smile:

8 Aug 2008, 3:53 AM
#239
karma_lab avatar

karma_lab

Zen Follower

Join Date:
Apr 2008
Posts:
135
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

batteryman:

Hello,

I have a small dilema. I cant figure out how to use the Cross Sell 1-way, which makes me feel kinda stupid. In the instruction it says.

But what is considered the upper and lower box. I have tried a few gifferent things but I keep getting the same error.

Did you ever figure this out? I also cannot determine how to cross-sell one way. I check the "cross sell one way" checkbox, no other box appears, using the Edit Cross-Sells box below it doesn't work, it simply doesn't seem to work right.

I did figure out that you can make a one-way cross-sell by doing a normal two-way cross-sell, and then deleting the one that goes the way that you don't want, but this seems counter-intuitive when there is a checkbox that is supposed to work.

8 Aug 2008, 3:55 AM
#240
karma_lab avatar

karma_lab

Zen Follower

Join Date:
Apr 2008
Posts:
135
Plugin Contributions:
0

Re: Just another Cross-Sell mod (support thread)

Dantes:

I found the solution:

(i.e. copy "init_yclass.php"
from "<zen-cart-root>/includes/init_includes/"
to "<zen-cart-root>/admin/includes/init_includes/")

Thanks! I finally got around to trying this, and it seems to have fixed "something", in that I can now access the Tools > Module Manager, which showed nothing installed, so I clicked on "Install new modules", and it apparently installed the cross-sell stuff again, after which it shows:

ID module_code Patch_level Version_name Update
1 ri_jaxs 1 Revision 185 update

...so this part seems OK.

Can you tell me, though:

Under Catalog, I have two new items at the end:

  • Advanced Cross-Sell
  • Cross-Sell Products

Selecting the second one gives me a "404 page not found error", as it is trying to load '/store/admin/xsell.php', which is a file that does not exist, at least on my installation. Is that correct?

Other than that, I have been able to configure some cross-sells on the Catalog > Advanced Cross-Sell page...