Zen Cart Logo
Forums / Bug Reports / [Done 1.3.8] SaleMaker - More Info

[Done 1.3.8] SaleMaker - More Info

Locked

Views: 2,022

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
9 Nov 2006, 6:37 PM
#1
s_p_ike avatar

s_p_ike

Zen Follower

Join Date:
Feb 2005
Location:
Italy
Posts:
178
Plugin Contributions:
0

[Done 1.3.8] SaleMaker - More Info

Hello, this is for sure a small bug affecting v1.3.5 and since there's no salemaker.php in changelog for v1.3.6 I suppose also this version is affected.

In SaleMaker, when you click on more info (the link activating the popup which tells which sales already include the specific category), the category name isn't bringed to the popup. In effect the variable $category[categories_name] has no value.

11 Nov 2006, 7:50 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done 1.3.8] SaleMaker - More Info

A quick fix for this is to replace lines 406 - 416 with:

    echo '        <td align="right"><table border="0" cellspacing="2" cellpadding="2">' . "\n";
	echo '        <tr>' . "\n";
	  if ($prev_categories_array[$category['categories_id']]) {
      echo '        <td>' . "\n";
$cname= zen_get_category_name($category['categories_id'], (int)$_SESSION['languages_id']);
?>
<script language="javascript" type="text/javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_SALEMAKER_POPUP, 'cid=' . $category['categories_id'] . '&cname='.$cname) . '\\\')">'.'(More Info)'.'</a>'; ?>');
//--></script>
<?php
	  }
	  echo "</td>\n";

We will look into this further for the next release ... thanks for the catch ...

1 Jan 2007, 3:58 AM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done 1.3.8] SaleMaker - More Info

That was a dumb fix ... :eek:

Fortunately it was not committed to v1.3.7 ...

The correct fix is to change the java portion around lines 410-414 in:
/admin/salemaker.php

To read:

?>
<script language="javascript" type="text/javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_SALEMAKER_POPUP, 'cid=' . $category['categories_id']) . '\\\')">'.'(More Info)'.'</a>'; ?>');
//--></script>
<?php

then change in:
/admin/salemaker_popup.php

  require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . FILENAME_SALEMAKER_POPUP . '.php');

To read:

  require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . FILENAME_SALEMAKER_POPUP . '.php');
  $cname = zen_get_category_name($_GET['cid'], (int)$_SESSION['languages_id']);

And the change:

<p class="main"><center><h1><?php echo HEADING_TITLE . ' - ' . $_GET['cname']; ?><?php echo zen_draw_separator(); ?></h1></center></p>

To read:

<p class="main"><center><h1><?php echo HEADING_TITLE . ' - ' . $cname; ?><?php echo zen_draw_separator(); ?></h1></center></p>

the other method would work for some category names and break in a horrible way for others ...

24 May 2007, 8:48 PM
#4
dedek avatar

dedek

New Zenner

Join Date:
Nov 2006
Posts:
9
Plugin Contributions:
1

Re: [Done 1.3.8] SaleMaker - More Info

Ajeh:

The correct fix is to change the java portion around lines 410-414 in:
/admin/salemaker.php

To read:

?>

<script language="javascript" type="text/javascript"><!-- document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_SALEMAKER_POPUP, 'cid=' . $category['categories_id']) . '\\\')">'.'(More Info)'.'</a>'; ?>'); //--></script> <?php ``` The hardcoded '(More Info)' string in the fix above should be replaced with constant defined in language file.
24 May 2007, 9:39 PM
#5
dedek avatar

dedek

New Zenner

Join Date:
Nov 2006
Posts:
9
Plugin Contributions:
1

Re: [Done 1.3.8] SaleMaker - More Info

/admin/salemaker.php, line 400

	    echo ' Warning : ' . $prev_categories_array[$category['categories_id']] . ' sales already include this category';

Another hardcoded message posted here.

24 May 2007, 10:42 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: [Done 1.3.8] SaleMaker - More Info

Dedek,

And how/what are these "bugs"??

25 May 2007, 1:20 AM
#7
dedek avatar

dedek

New Zenner

Join Date:
Nov 2006
Posts:
9
Plugin Contributions:
1

Re: [Done 1.3.8] SaleMaker - More Info

Kobra,

there are many people using Zen Cart translated only to their native language.

If I install Zen Cart for my customers and must fix (translate) every hardcoded message, it is bug for me. If I don't fix it, it is bug for my customers. Not all of them understand English.

25 May 2007, 1:29 AM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: [Done 1.3.8] SaleMaker - More Info

it is bug for me. If I don't fix it, it is bug for my customers.
Correct a "bug for you" not specifically a bug for ???many users

But being OpenSource you are free to alter it to fit your requirements

25 May 2007, 2:53 AM
#9
dedek avatar

dedek

New Zenner

Join Date:
Nov 2006
Posts:
9
Plugin Contributions:
1

Re: [Done 1.3.8] SaleMaker - More Info

kobra:

Correct a "bug for you" not specifically a bug for ???many users

But being OpenSource you are free to alter it to fit your requirements

Kobra, it's vain discussion.

I don't claim nothing for myself. I found it, fixed and then reported for other. That's all.

Let's decide Zen Cart developers to fix it in future version or not.

25 May 2007, 3:04 AM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done 1.3.8] SaleMaker - More Info

This has been fixed for v1.3.8 ... thanks for the update ...

While it does not "break" anything it does make this wrong or incorrect for other languages which is more or less an unexpected feature ... which some might call a bug ... :smartalec: