Zen Cart Logo
Forums / Bug Reports / Manufacturers (v1.5.8a)

Manufacturers (v1.5.8a)

Views: 1,798

Results 1 to 7 of 7
11 Apr 2023, 14:55
#1
earp avatar

earp

New Zenner

Join Date:
Dec 2020
Location:
Ohio
Posts:
30
Plugin Contributions:
0

Manufacturers (v1.5.8a)

Sorry if I'm missing something, but when I try to create manufacturers, there is no provision or ability to do so on the Admin - Catalog - Manufacturers page. Same issue on two separate clean installations of version 1.5.8a with only the Clone Template mod installed. Thanks.

11 Apr 2023, 16:12
#2
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Manufacturers (v1.5.8a)

earp:

Sorry if I'm missing something, but when I try to create manufacturers, there is no provision or ability to do so on the Admin - Catalog - Manufacturers page. Same issue on two separate clean installations of version 1.5.8a with only the Clone Template mod installed. Thanks.

I think you're correct, I get the same on ZC v1.5.8a but not on ZC v1.5.8,

Until the issue is resolved you can navigate to the Insert Manufacturers screen with this URL:

YOUR_ADMIN/index.php?cmd=manufacturers&mID=&action=new

Edit: It might be to do with having no existing manufacturers in ZC v1.5.8a (I don't remember deleting any) as once one manufacturer has been added the insert button is then successfully displayed.

11 Apr 2023, 23:10
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Manufacturers (v1.5.8a)

Confirmed as a bug. Please reply to this thread if you'll take it.

12 Apr 2023, 12:25
#4
earp avatar

earp

New Zenner

Join Date:
Dec 2020
Location:
Ohio
Posts:
30
Plugin Contributions:
0

Re: Manufacturers (v1.5.8a)

I'm not programmer enough to fix the bug, but Compare It! says the problem is on line 329 in admin/manufacturers.php. I replaced that file with the one from 1.5.8 and all is good.

12 Apr 2023, 13:20
#5
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Manufacturers (v1.5.8a)

earp:

I'm not programmer enough to fix the bug, but Compare It! says the problem is on line 329 in admin/manufacturers.php. I replaced that file with the one from 1.5.8 and all is good.

I think doing that, while it works, will produce a PHP Warning in the logs folder on PHP 8 (Undefined variable $mInfo) - which is possibly why the change to line 329 was made. I've had a look at the code but am also not knowledgeable enough.

12 Apr 2023, 20:11
#6
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Manufacturers (v1.5.8a)

You can do it, Simon!

03 Feb 2024, 21:27
#7
oj_simon avatar

oj_simon

Zen Follower

Join Date:
Nov 2023
Location:
Hounslow
Posts:
129
Plugin Contributions:
0

Re: Manufacturers (v1.5.8a)

The error free fix is:
go to line 329 in admin/manufacturers.php
Find:

      <?php if (empty($action) && !empty($mInfo)) { ?>
        <div class="col-sm-12 text-right">
          <a href="<?php echo zen_href_link(FILENAME_MANUFACTURERS, ($currentPage != 0 ? 'page=' . $currentPage . '&' : '') . 'mID=' . $mInfo->manufacturers_id . '&action=new'); ?>" class="btn btn-primary" role="button"><?php echo IMAGE_INSERT; ?></a>
        </div>
      <?php } ?>

Replace the above with:

      <?php if (empty($action) && !empty($mInfo)) { ?>
        <div class="col-sm-12 text-right">
	<a href="<?php echo zen_href_link(FILENAME_MANUFACTURERS, ($currentPage != 0 ? 'page=' . $currentPage . '&' : '') . 'mID=' . $mInfo->manufacturers_id . '&action=new'); ?>" class="btn btn-primary" role="button"><?php echo IMAGE_INSERT; ?></a>
        </div>
      <?php }else{ ?>
      <div class="col-sm-12 text-right">
      <a href="<?php echo zen_href_link(FILENAME_MANUFACTURERS, ($currentPage != 0 ? 'page=' . $currentPage . '&' : '') . 'mID=&action=new'); ?>" class="btn btn-primary" role="button"><?php echo IMAGE_INSERT; ?></a>
        </div>
      <?php } ?>

Hope this helps.