Thread: Ask A Question

Page 35 of 40 FirstFirst ... 253334353637 ... LastLast
Results 341 to 350 of 399
  1. #341
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: Ask A Question

    Quote Originally Posted by gsallen101289 View Post
    I have tried that as well. It may be due to the fact this is for 1.3 and I am running v1.5.5e. Thank you for your time though.
    The current download of this plugin supports ZC 1.5.5e. I don't know what you mean about "this" is for ZC 1.3.9. Although now that I have done some additional searching to find information that might clarify this situation, there is a separate plugin found here: https://www.zen-cart.com/downloads.php?do=file&id=351 that adds a sidebox. It is only related to the plugin of this thread by claiming to be an expansion off of the original author's (swguy) work. Perhaps there is another similar plugin, but the current information indicates that it was last "updated" to be compatible with ZC 1.3.5. This does not mean it couldn't work with ZC 1.5.x, but such a claim can't be made unless reviewed. Anyways, point overall being, glad to help, but doing so requires additional information. There are plenty of other like minded individuals in the forum that can also help. Basic concept being tell the forum how to duplicate your issue, from where the files came from, what was done to them to make them unique from the original fileset, where they were installed, etc... and then it becomes easier to address the issue(s).

    Mind you there were some subtle changes that were needed to upgrade this plugin (found at: https://www.zen-cart.com/downloads.php?do=file&id=109) to align with more recent versions of ZC, but really it comes down to review of the components of the sidebox to identify why the discrepancy exists. Suggest starting at the "last" file and then work back to other information that built the output. Actually, you could/should completely disable the sidebox using the tools->layout boxes controller. And then could properly install the operation as outlined in the instruction (at least in reference to the plugin directly associated with this thread).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #342
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: Ask A Question

    Quote Originally Posted by gsallen101289 View Post
    I have tried that as well. It may be due to the fact this is for 1.3 and I am running v1.5.5e. Thank you for your time though.
    Quote Originally Posted by mc12345678 View Post
    The current download of this plugin supports ZC 1.5.5e. I don't know what you mean about "this" is for ZC 1.3.9. Although now that I have done some additional searching to find information that might clarify this situation, there is a separate plugin found here: https://www.zen-cart.com/downloads.php?do=file&id=351 that adds a sidebox. It is only related to the plugin of this thread by claiming to be an expansion off of the original author's (swguy) work. Perhaps there is another similar plugin, but the current information indicates that it was last "updated" to be compatible with ZC 1.3.5. This does not mean it couldn't work with ZC 1.5.x, but such a claim can't be made unless reviewed. Anyways, point overall being, glad to help, but doing so requires additional information. There are plenty of other like minded individuals in the forum that can also help. Basic concept being tell the forum how to duplicate your issue, from where the files came from, what was done to them to make them unique from the original fileset, where they were installed, etc... and then it becomes easier to address the issue(s).

    Mind you there were some subtle changes that were needed to upgrade this plugin (found at: https://www.zen-cart.com/downloads.php?do=file&id=109) to align with more recent versions of ZC, but really it comes down to review of the components of the sidebox to identify why the discrepancy exists. Suggest starting at the "last" file and then work back to other information that built the output. Actually, you could/should completely disable the sidebox using the tools->layout boxes controller. And then could properly install the operation as outlined in the instruction (at least in reference to the plugin directly associated with this thread).
    So based on the above assumptions, I was able to identify something that may help with your situation.

    In previous review of the referenced site, the sidebox was appearing on the right side. I don't recall if it was first or some location below that; however, as a result of being on the right side, there is some code in the common directory to display sideboxes on the right. Within that code, it checks to see if the variable $title_link is something other than false. If it is something other than false, then a link is generated around the $title text that is set within includes/modules/YOUR_TEMPLATE/sideboxes/ask_a_question_sidebox.php.

    In this case or at this point in execution, $title_link is set to FILENAME_REVIEWS. As a result, the ask a question sidebox is displayed with a link to the reviews, but with text/title of being ask a question. A solution to this is to modify includes/modules/YOUR_TEMPLATE/sideboxes/ask_a_question_sidebox.php towards the end of the file within this section:

    Code:
      if ($show_blank_sidebox == true) {
          require($template->get_template_dir('tpl_ask_a_question_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_ask_a_question_sidebox.php');
          $title =  BOX_HEADING_ASK_A_QUESTION_SIDEBOX;
          $left_corner = false;
          $right_corner = false;
          $right_arrow = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
     }
    and add an assignment to $title_link.

    If it is desired to show an "upper" link that goes to the correct location then:
    Code:
      if ($show_blank_sidebox == true) {
          require($template->get_template_dir('tpl_ask_a_question_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_ask_a_question_sidebox.php');
          $title =  BOX_HEADING_ASK_A_QUESTION_SIDEBOX;
          $title_link = FILENAME_ASK_A_QUESTION; // FILENAME_ASK_A_QUESTION if desire a link in the title.  false if do not want the title to be/have a link.
          $left_corner = false;
          $right_corner = false;
          $right_arrow = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
     }
    If it is to not show such a link with the title of the box, then:
    Code:
      if ($show_blank_sidebox == true) {
           require($template->get_template_dir('tpl_ask_a_question_sidebox.php',DIR_WS_TEMPLATE,  $current_page_base,'sideboxes'). '/tpl_ask_a_question_sidebox.php');
          $title =  BOX_HEADING_ASK_A_QUESTION_SIDEBOX;
          $title_link = false; // false if do not want the title to be/have a link.  FILENAME_ASK_A_QUESTION if desire a link in the title.
          $left_corner = false;
          $right_corner = false;
          $right_arrow = false;
           require($template->get_template_dir($column_box_default,  DIR_WS_TEMPLATE, $current_page_base,'common') . '/' .  $column_box_default);
     }
    It is unfortunate that this aspect was not incorporated to that plugin, because the associated code was around at least a year before the sidebox plugin was published. What it does seem to show though is that the plugin probably was positioned either as the first sidebox where $title_link was not yet defined, or it was positioned after another sidebox that set $title_link to false as above, and therefore was not observed as an error nor was it published or identified as an issue.

    Again though I say that one should be mindful of the use of sideboxes with the current responsive template design(s). As I said, when I initially attempted to observe the issue from a mobile device, the ask a question sidebox was not presented as an active/on screen object. It was in the page's source code, but the css disabled it from view. This means that mobile, tablet, and other narrow display of the page will not present the ask_a_question option to customers. Such a problem is not present with the "original" implementation of this plugin/feature that places the ask a question code in the product_info page.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #343
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: Ask A Question

    Without going line for line through the sidebox version of the plugin, my recommendation would be to use the template related files from this plugin: https://www.zen-cart.com/downloads.php?do=file&id=109 such as includes/templates/YOUR_TEMPLATE/templates/tpl_ask_a_question_default.php and includes/modules/pages/ask_a_question (all files within the directory) if using the sidebox "method". At some point I might consider taking a look at the other plugin for an update to bring it in line with current PHP/ZC standards.

    Generally speaking the code that I have looked at will likely work without much modification, but it is also a little out-dated (using PHP functions such as eregi_replace instead of preg_replace) and doesn't include some of the improvements that have been made to the front end presentation that would be expected (honey-pot, display of the store's address if so desired/set, notifiers to edit/modify associated data, etc...)

    Unfortunately the OP of the code didn't start a thread and that the only place that they appear to have discussed the plugin is within this thread back in 2007 where they were advised to post that code in the sidebox section of the ZC plugins area.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #344
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: Ask A Question

    Quote Originally Posted by mc12345678 View Post
    So based on the above assumptions, I was able to identify something that may help with your situation.

    In previous review of the referenced site, the sidebox was appearing on the right side. I don't recall if it was first or some location below that; however, as a result of being on the right side, there is some code in the common directory to display sideboxes on the right. Within that code, it checks to see if the variable $title_link is something other than false. If it is something other than false, then a link is generated around the $title text that is set within includes/modules/YOUR_TEMPLATE/sideboxes/ask_a_question_sidebox.php.

    In this case or at this point in execution, $title_link is set to FILENAME_REVIEWS. As a result, the ask a question sidebox is displayed with a link to the reviews, but with text/title of being ask a question. A solution to this is to modify includes/modules/YOUR_TEMPLATE/sideboxes/ask_a_question_sidebox.php towards the end of the file within this section:

    Code:
      if ($show_blank_sidebox == true) {
          require($template->get_template_dir('tpl_ask_a_question_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_ask_a_question_sidebox.php');
          $title =  BOX_HEADING_ASK_A_QUESTION_SIDEBOX;
          $left_corner = false;
          $right_corner = false;
          $right_arrow = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
     }
    and add an assignment to $title_link.

    If it is desired to show an "upper" link that goes to the correct location then:
    Code:
      if ($show_blank_sidebox == true) {
          require($template->get_template_dir('tpl_ask_a_question_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_ask_a_question_sidebox.php');
          $title =  BOX_HEADING_ASK_A_QUESTION_SIDEBOX;
          $title_link = FILENAME_ASK_A_QUESTION; // FILENAME_ASK_A_QUESTION if desire a link in the title.  false if do not want the title to be/have a link.
          $left_corner = false;
          $right_corner = false;
          $right_arrow = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
     }
    If it is to not show such a link with the title of the box, then:
    Code:
      if ($show_blank_sidebox == true) {
           require($template->get_template_dir('tpl_ask_a_question_sidebox.php',DIR_WS_TEMPLATE,  $current_page_base,'sideboxes'). '/tpl_ask_a_question_sidebox.php');
          $title =  BOX_HEADING_ASK_A_QUESTION_SIDEBOX;
          $title_link = false; // false if do not want the title to be/have a link.  FILENAME_ASK_A_QUESTION if desire a link in the title.
          $left_corner = false;
          $right_corner = false;
          $right_arrow = false;
           require($template->get_template_dir($column_box_default,  DIR_WS_TEMPLATE, $current_page_base,'common') . '/' .  $column_box_default);
     }
    It is unfortunate that this aspect was not incorporated to that plugin, because the associated code was around at least a year before the sidebox plugin was published. What it does seem to show though is that the plugin probably was positioned either as the first sidebox where $title_link was not yet defined, or it was positioned after another sidebox that set $title_link to false as above, and therefore was not observed as an error nor was it published or identified as an issue.

    Again though I say that one should be mindful of the use of sideboxes with the current responsive template design(s). As I said, when I initially attempted to observe the issue from a mobile device, the ask a question sidebox was not presented as an active/on screen object. It was in the page's source code, but the css disabled it from view. This means that mobile, tablet, and other narrow display of the page will not present the ask_a_question option to customers. Such a problem is not present with the "original" implementation of this plugin/feature that places the ask a question code in the product_info page.
    Quote Originally Posted by mc12345678 View Post
    Without going line for line through the sidebox version of the plugin, my recommendation would be to use the template related files from this plugin: https://www.zen-cart.com/downloads.php?do=file&id=109 such as includes/templates/YOUR_TEMPLATE/templates/tpl_ask_a_question_default.php and includes/modules/pages/ask_a_question (all files within the directory) if using the sidebox "method". At some point I might consider taking a look at the other plugin for an update to bring it in line with current PHP/ZC standards.

    Generally speaking the code that I have looked at will likely work without much modification, but it is also a little out-dated (using PHP functions such as eregi_replace instead of preg_replace) and doesn't include some of the improvements that have been made to the front end presentation that would be expected (honey-pot, display of the store's address if so desired/set, notifiers to edit/modify associated data, etc...)

    Unfortunately the OP of the code didn't start a thread and that the only place that they appear to have discussed the plugin is within this thread back in 2007 where they were advised to post that code in the sidebox section of the ZC plugins area.
    So, uploaded as an "upgrade" or update the Ask a Question (with Sidebox) to basically provide JUST the sidebox code that would be needed to work with the Ask a Question plugin that is central to this particular thread. Basically, once the Ask a Question software is loaded to the server, Ask a Question (with Sidebox) could be loaded and the sidebox is expected to work within the limits of sideboxes being displayed to the visitor. What this means (and described in the instruction) is that the includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php modification described in the instructions of this plugin do not need to be made to support having at least one clickable link to access the Ask a Question page (if the sidebox is displayed to the end user). Also, that sidebox code now does not require an update when this main package is updated which further reduces maintenance.

    So the next question would be should that plugin be directly incorporated into this one? Well, maybe, but way back when, the suggestion when originally developed was to keep/place sideboxes in the applicable ZC sideboxes section and to keep it separate from the main/core code provided by this plugin.

    Oh, another "important" part is that since the base code of the sidebox system hasn't really changed since the Ask a Question (with Sidebox) code was first written, I requested the version compatibility to reflect its current "scope" of possible usage. Further proves to anyone of interest that just because a plugin is identified as compatible possibly with an old system such as ZC 1.3.5, doesn't mean the essential parts won't work on ZC 1.5.5...

    As far as the code goes:
    Added code in the sidebox code to positively control that there is no title link to be displayed.
    This would have eliminated the issue seen above by gsallen101289.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #345
    Join Date
    Feb 2016
    Location
    Canada
    Posts
    186
    Plugin Contributions
    0

    Default Re: Ask A Question

    Has anyone been successful with adding the product model or description to both Ask a Question page or email details. Any guidance please.

    Thanks,

  6. #346
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,770
    Plugin Contributions
    30

    Default Re: Ask A Question

    Quote Originally Posted by allmart View Post
    Has anyone been successful with adding the product model or description to both Ask a Question page or email details. Any guidance please.

    Thanks,
    I have changed it so in the email the shop admin receives:
    the reply-to address is the client email
    the subject is "Enquiry about:" product model

    The email body contains
    from: client email
    phone: client phone as entered on form
    product: model, name, link
    text of question

    "For office use" footer.

    I assume that is similar to what you are looking for?
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  7. #347
    Join Date
    Feb 2016
    Location
    Canada
    Posts
    186
    Plugin Contributions
    0

    Default Re: Ask A Question

    Yes, that's what I am looking for. Can you please provide the coding you used.

    Thanks

  8. #348
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,770
    Plugin Contributions
    30

    Default Re: Ask A Question

    I see there have been some tweaks to the plugin since I installed 1.9.
    I attach my file structure which is still based on 1.9.
    includes - changes Steve based on 1.9.zip
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  9. #349
    Join Date
    Feb 2016
    Location
    Canada
    Posts
    186
    Plugin Contributions
    0

    Default Re: Ask A Question

    Thank you so much!

  10. #350
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: Ask A Question

    Quote Originally Posted by allmart View Post
    Has anyone been successful with adding the product model or description to both Ask a Question page or email details. Any guidance please.

    Thanks,
    Quote Originally Posted by allmart View Post
    Thank you so much!
    To then add products description to that as well, in includes/modules/pages/ask_a_question/header_php.php

    change:
    Code:
        $product_info_query = "select pd.products_name, p.products_image, p.products_model
                               from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                               where p.products_status = '1'
                               and p.products_id = '" . (int)$_GET['products_id'] . "'
                               and p.products_id = pd.products_id
                               and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
    to:
    Code:
        $product_info_query = "select pd.products_name, p.products_image, p.products_model, pd.products_description
                               from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                               where p.products_status = '1'
                               and p.products_id = '" . (int)$_GET['products_id'] . "'
                               and p.products_id = pd.products_id
                               and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
    And where applicable in the email "generation" at least for the text version:
    Code:
        $text_message = OFFICE_FROM . "\t\t" . $contact_name . "\n" .
        OFFICE_PHONE . "\t" . $phone . "\n" .//Steve added extra tab to name field to make it line up
        OFFICE_EMAIL . "\t" . $email_address . "\n" .
        PROD_NAME . "\t" . $product_info->fields['products_model'] . ' - ' . $product_info->fields['products_name'] .  ' - ' . $product_info->fields['products_description'] . "\n" .  
        zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$_GET['products_id']) .
        "\n\n" .
    And would use the same $product_info->fields['products_description'] variable where applicable/appropriate for the html email portion as desired.

    In both cases, more customization can be applied rather than this "wedge" in of information.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 35 of 40 FirstFirst ... 253334353637 ... LastLast

Similar Threads

  1. Ask A Question module
    By okibi in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 18 Apr 2007, 01:55 PM
  2. Ask a question 1.7
    By Kodam in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 4 Apr 2007, 11:16 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