Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2013
    Location
    Wisconsin
    Posts
    134
    Plugin Contributions
    0

    red flag Ask A Question Form Not Working for Products

    ZenCart 1.5.7b
    PHP: 5.6
    Plug-ins Used: Image Handler 5, E-mail Archive Manager, NonCAPTCHA, and ZX Slideshow

    When I go to a product and click on "Ask a Question," it shows "No Picture Available" above the Ask A Question Contact Form even though the item has a picture. Also, when I try to "Send" a message about the item in the Ask A Question Contact Form, it takes me to a page that says, "Sorry, the product was not found" and shows other available products. And the Ask a Question e-mail never sends as it is not in E-mail Archive Manager. I am using Version 1.5.7b and the Responsive Classic Template. Everything appears to be working with the template. For now, I shut off the "Ask A Question" but thought I should report this in case it is a bug.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Ask A Question Form Not Working for Products

    Like I said in my reply to your other post on this same issue:

    It's not affecting everyone. If it's a "bug", then it's a bug on your site.
    Feels like something amiss with alterations made to your template, eg tpl_product_info_display.php (assuming you're using Product General, adapt filename for other product-types).
    Two approaches one could take for researching: compare your customized tpl_product_info_display.php with the original and see what's different in that part of the file (probably has a change made to the product ID); ... or turn the feature back on and post a link to the page so we can look at the raw HTML generated and compare it with a working site in order to find approximate clues to what might be wrong/different. You could compare the raw html to that of a working site as well. eg WinMerge
    .

    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
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,682
    Plugin Contributions
    123

    Default Re: Ask A Question Form Not Working for Products

    Also, suggest updating your PHP version; 5.6 is quite old and now unsupported. 1.5.7 runs fine on 7.3+.
    That Software Guy. My Store: Zen Cart Modifications
    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.

  4. #4
    Join Date
    Apr 2013
    Location
    Wisconsin
    Posts
    134
    Plugin Contributions
    0

    Default Re: Ask A Question Form Not Working for Products

    Quote Originally Posted by DrByte View Post
    Like I said in my reply to your other post on this same issue:

    It's not affecting everyone. If it's a "bug", then it's a bug on your site.
    Feels like something amiss with alterations made to your template, eg tpl_product_info_display.php (assuming you're using Product General, adapt filename for other product-types).
    Two approaches one could take for researching: compare your customized tpl_product_info_display.php with the original and see what's different in that part of the file (probably has a change made to the product ID); ... or turn the feature back on and post a link to the page so we can look at the raw HTML generated and compare it with a working site in order to find approximate clues to what might be wrong/different. You could compare the raw html to that of a working site as well. eg WinMerge
    Thank you. It was in that file. I looked up the Ask a Question 2.2 plug-in and uploaded those files to my server. It worked, so I tried to figure out what was wrong with the Ask a Question that I was using with my Responsive Classic template. I noticed that when I hovered over the "Ask a Question" button on my product, one showed "products_id" and one showed "pid." The "pid" one did not work, so I changed the code in tpl_product_info_display.php to "products_id" like this, and it worked:

    Code:
    <!-- bof Ask a Question -->
    <br>
    <span id="productQuestions" class="">
    <?php echo '<a href="' . zen_href_link(FILENAME_ASK_A_QUESTION, 'products_id=' . $_GET['products_id'], 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_ASK_A_QUESTION, BUTTON_ASK_A_QUESTION_ALT) . '</a>'; ?>
    </span>
    <br class="clearBoth">
    <br>
    <!-- eof Ask a Question -->

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,682
    Plugin Contributions
    123

    Default Re: Ask A Question Form Not Working for Products

    AAQ is built-in to Zen Cart 1.5.7+, so you don't need to use a plugin anymore. You should revert the files you changed.
    That Software Guy. My Store: Zen Cart Modifications
    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.

  6. #6
    Join Date
    Apr 2013
    Location
    Wisconsin
    Posts
    134
    Plugin Contributions
    0

    Default Re: Ask A Question Form Not Working for Products

    Quote Originally Posted by swguy View Post
    AAQ is built-in to Zen Cart 1.5.7+, so you don't need to use a plugin anymore. You should revert the files you changed.
    I only used that plug-in to find the issue. I have all the correct files on my server for 1.5.7b but had to make the one change I noted above for it to work, which was changing one line to "products_id."

  7. #7
    Join Date
    Apr 2013
    Location
    Wisconsin
    Posts
    134
    Plugin Contributions
    0

    Default Re: Ask A Question Form Not Working for Products

    Quote Originally Posted by CookieMonster View Post
    I only used that plug-in to find the issue. I have all the correct files on my server for 1.5.7b but had to make the one change I noted above for it to work, which was changing one line to "products_id."
    I guess I also used the includes, modules, pages, ask a question, header_php.php file from the old Ask a Question plug-in, but everything else is the same. I guess it must be something in these two files, but I used Win Merge to compare the files I had on the server with the ones in the Responsive Classic template, and they were identical, so I'm not sure what the problem is, but it works just fine with that old file and my one small "products_id" modification.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Ask A Question Form Not Working for Products

    When the ask-a-question mod was adapted into core code, products_id was intentionally changed. Thus, all the places where ask-a-question features are implemented require the same change.

    While you're free to use the old approach required by having a mixture of old plugin files still installed, your next upgrade to a newer Zen Cart version will require you to re-make those adaptations repeatedly.
    .

    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.

 

 

Similar Threads

  1. v151 Contact Us form with Call for Price not working
    By Sachin1008 in forum Managing Customers and Orders
    Replies: 6
    Last Post: 7 May 2014, 03:09 AM
  2. Call for Price form not working
    By Sachin1008 in forum Customization from the Admin
    Replies: 1
    Last Post: 18 Apr 2014, 05:52 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