Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2020
    Location
    Manchester UK
    Posts
    6
    Plugin Contributions
    0

    Default [Done v157a] Product Master Category Bug

    Zencart shop owner for years now,
    I also contribute to buy the guys some darn big coffee's to keep them and us all going.

    So i have a large site with over 70K items,
    just noticed a few days ago that the category links now need extra work to make correct.

    I have just gone back and adjusted nearly 1,600 items because of this.
    What happens is that i create a duplicate item as a template, then i edit it to make a totally new item.
    All items are different, but the same template from a live item.

    So, the error i have is,
    say I copy item A, to create item B a new listing,
    I move item B from the category A to the new category, BUT it does not adopt the new category master,
    I have to make sure I do a drop down if it is listed in two categories, or re edit if it is in just one catergory.
    (I don't know if any one can folllow this).

    So before when I moved an item to a new category, it adopted that category, now it just goes to error.

    hope this bug is fixed on the next update chaps.

  2. #2
    Join Date
    Jan 2004
    Posts
    65,773
    Blog Entries
    7
    Plugin Contributions
    245

    Default Re: Product Master Category BUG

    Critical piece of information missing:
    What Zen Cart version are you using?

    And what plugins installed?

    There was a bug with duplicating products, in the first release of v157 ... but you didn't say which Zen Cart version, so it's impossible to know whether your symptoms are fixable with that.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jul 2020
    Location
    Manchester UK
    Posts
    6
    Plugin Contributions
    0

    Default Re: Product Master Category BUG

    Hi,
    oops, yes critical indeed, silly me, i just thought that every one was using the latest version.

    (You are presently using: v1.5.7)
    PHP Version 7.3.23

    plugin's are,
    supertracker
    ultimate url's
    TM mega menu
    Paypal mod.

    i will give the link you sent a go, to see if this fixes it.



    oh, and just a suggestion,

    1,
    on a new duplicate items listings the,
    Copy Metatags to Duplicate?
    Copy Linked Categories to Duplicate?
    Could these radio buttons be set as default (OFF to NO )instead of ON,
    would save me so much time.

    2,
    New image/s upload for an item,
    Is there any chance we could selct several items at once to upload and press one button,
    and the last/first image would be the main directory listing, this would also save loads of time.

    thanks in advance, keep up the great work, i really appreciate you.

  4. #4
    Join Date
    Jul 2020
    Location
    Manchester UK
    Posts
    6
    Plugin Contributions
    0

    Default Re: Product Master Category BUG

    hi again,
    yes it worked.

    I added the line to the
    at 100 $sql_data_array['master_categories_id'] = $categories_id;

    to
    admin/includes/modules/copy_product_confirm.php
    admin/includes/modules/product_music/copy_product_confirm.php

    and now when I move an item to the new category, it now accepts the new category as master default.

    thanks for all your help again.

  5. #5
    Join Date
    Jul 2012
    Posts
    15,367
    Plugin Contributions
    17

    Default Re: Product Master Category bug

    Quote Originally Posted by Footie1 View Post
    oh, and just a suggestion,

    1,
    on a new duplicate items listings the,
    Copy Metatags to Duplicate?
    Copy Linked Categories to Duplicate?
    Could these radio buttons be set as default (OFF to NO )instead of ON,
    would save me so much time.

    2,
    New image/s upload for an item,
    Is there any chance we could selct several items at once to upload and press one button,
    and the last/first image would be the main directory listing, this would also save loads of time.
    To possibly address item 1 above, the code responsible seems to be in: admin/includes/modules/copy_product.php or the product type override of that file. Look at/around lines 60-75: https://github.com/zencart/zencart/b...uct.php#L60-75

    The zen_draw_radio_field ending with ", true" is defaulted to selected.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  6. #6
    Join Date
    Jul 2020
    Location
    Manchester UK
    Posts
    6
    Plugin Contributions
    0

    Default Re: Product Master Category bug

    Hi Mc12345678,
    thanks for your kind reply,
    it is not a bug as per say at all, Zen cart is great software, i really like it,
    yes it is complex and people can fine tune it to suit, is jst to save so much time on each item.

    The radio button,
    i located the file, but it seems to have eluded me as to which one the copy_metatags_yes', true OFF/False option is i should change, copy false/ture/no.

    //only ask about metatags if defined
    if ($metatags_defined) {
    $contents[] = array(
    'text' => '<h6>' . TEXT_COPY_METATAGS . '</h6>' .
    '<div class="radio"><label>' . zen_draw_radio_field('copy_metatags', 'copy_metatags_yes', true) . TEXT_YES . '</label></div>' .
    '<div class="radio"><label>' . zen_draw_radio_field('copy_metatags', 'copy_metatags_no') . TEXT_NO . '</label></div>'


    thanks in adavance.
    ---
    while (!$metatags_descriptions->EOF) {//one row per language
    $db->Execute("INSERT INTO " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . " (products_id, language_id, metatags_title, metatags_keywords, metatags_description)
    VALUES (
    '" . $dup_products_id . "',
    '" . (int)$metatags_descriptions->fields['language_id'] . "',
    '" . zen_db_input($metatags_descriptions->fields['metatags_title']) . "',
    '" . zen_db_input($metatags_descriptions->fields['metatags_keywords']) . "',
    '" . zen_db_input($metatags_descriptions->fields['metatags_description']) . "')");

    $messageStack->add_session(sprintf(TEXT_COPY_AS_DUPLICATE_METATAGS, (int)$metatags_descriptions->fields['language_id'], $products_id, $dup_products_id), 'success');

  7. #7
    Join Date
    Jul 2012
    Posts
    15,367
    Plugin Contributions
    17

    Default Re: Product Master Category bug

    As stated in my previous post, the function zen_draw_radio_field that ends with ", true" is defaulted to selected. So, this is the original where the copy_metatags_yes flag is auto-checked as "yes":
    Code:
    //only ask about metatags if defined
    if ($metatags_defined) {
    $contents[] = array(
    'text' => '<h6>' . TEXT_COPY_METATAGS . '</h6>' .
    '<div class="radio"><label>' . zen_draw_radio_field('copy_metatags', 'copy_metatags_yes', true) . TEXT_YES . '</label></div>' .
    '<div class="radio"><label>' . zen_draw_radio_field('copy_metatags', 'copy_metatags_no') . TEXT_NO . '</label></div>'
    Here it is with the no auto-checked:
    Code:
    //only ask about metatags if defined
    if ($metatags_defined) {
    $contents[] = array(
    'text' => '<h6>' . TEXT_COPY_METATAGS . '</h6>' .
    '<div class="radio"><label>' . zen_draw_radio_field('copy_metatags', 'copy_metatags_yes') . TEXT_YES . '</label></div>' .
    '<div class="radio"><label>' . zen_draw_radio_field('copy_metatags', 'copy_metatags_no', true) . TEXT_NO . '</label></div>'
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  8. #8
    Join Date
    Jul 2020
    Location
    Manchester UK
    Posts
    6
    Plugin Contributions
    0

    Default Re: Product Master Category bug

    Hi again,
    yes you are correct, this fixed the issue,
    the radio buttons now default to off, brilliant.
    I just did not know what to input ie false/yes/no.

    thanks for your help.
    I have added your above website link to my favs, when i need big help in the future, of which i will pay for of course.

    kind regards to everyone who helped, and hopefully this helps someone else.

    Thread can now be closed.

 

 

Similar Threads

  1. Replies: 6
    Last Post: 31 Oct 2020, 04:35 PM
  2. Replies: 3
    Last Post: 27 Jul 2020, 06:20 PM
  3. Replies: 0
    Last Post: 15 Dec 2018, 02:31 PM
  4. Product Master Category: ID# 0
    By Sunabac in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 8 Aug 2017, 03:18 PM
  5. Replies: 10
    Last Post: 30 Apr 2010, 04:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR