If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / Manufacturers (v1.5.8a)

Manufacturers (v1.5.8a)

Started by earp on 11 Apr 2023, 2:55 PM · Views: 1,845

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

earp

New Zenner

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

Post #1 by 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.

11 Apr 2023, 4:12 PM
#2
simon1066 avatar

simon1066

Totally Zenned

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

Post #2 by simon1066

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.

Simon

11 Apr 2023, 11:10 PM
#3
swguy avatar

swguy

Administrator

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

Post #3 by swguy

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

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

12 Apr 2023, 12:25 PM
#4
earp avatar

earp

New Zenner

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

Post #4 by 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.

12 Apr 2023, 1:20 PM
#5
simon1066 avatar

simon1066

Totally Zenned

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

Post #5 by simon1066

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.

Simon

12 Apr 2023, 8:11 PM
#6
swguy avatar

swguy

Administrator

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

Post #6 by swguy

You can do it, Simon!

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

3 Feb 2024, 9:27 PM
#7
oj_simon avatar

oj_simon

Zen Follower

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

Post #7 by oj_simon

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.