Ask A Question

Views: 120,989

Results 341 to 360 of 399
24 May 2017, 9:40 AM
#341
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Ask A Question

gsallen101289:

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...

24 May 2017, 11:04 AM
#342
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ask A Question

gsallen101289:

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.
mc12345678:

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:

  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:

  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:

  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...

24 May 2017, 11:51 AM
#343
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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...

2 Jun 2017, 1:09 PM
#344
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ask A Question

mc12345678:

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:

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:
> ```
  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:

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.

> **mc12345678:**
>
> 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)](https://www.zen-cart.com/downloads.php?do=file&id=351) to basically provide JUST the sidebox code that would be needed to work with the [Ask a Question plugin](https://www.zen-cart.com/downloads.php?do=file&id=109) 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...

6 Jun 2017, 6:25 PM
#345
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

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,

7 Jun 2017, 9:17 AM
#346
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Ask A Question

allmart:

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 Jun 2017, 4:17 PM
#347
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: Ask A Question

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

Thanks

8 Jun 2017, 9:11 AM
#348
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

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.
Attachment #17084

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

8 Jun 2017, 11:18 AM
#349
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: Ask A Question

Thank you so much!

8 Jun 2017, 1:46 PM
#350
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ask A Question

allmart:

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

Thanks,

allmart:

Thank you so much!

To then add products description to that as well, in includes/modules/pages/ask_a_question/header_php.php

change:

    $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:

    $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:

    $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...

8 Jun 2017, 1:52 PM
#351
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: Ask A Question

mc12345678.. You truly are Totally Zenned, Thank you!

8 Jun 2017, 2:01 PM
#352
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Ask A Question

...since I hacked this up over 5 years ago, I make no excuses for it...I've never looked at it since so I've no doubt it could and should be done better. In fact Conor-Ceon was integrating this functionality into Back in Stock for me when he passed, so it almost got done "properly".

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

8 Jun 2017, 2:14 PM
#353
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ask A Question

torvista:

...since I hacked this up over 5 years ago, I make no excuses for it...I've never looked at it since so I've no doubt it could and should be done better. In fact Conor-Ceon was integrating this functionality into Back in Stock for me when he passed, so it almost got done "properly".

Noted a few things that should be done with more sanitization, but certainly there are "features" that can reduce store owner headache (spam) and parts of the code that require other "outside" information to add some bot detection methodologies of use.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

15 Dec 2017, 11:33 PM
#354
mikebr avatar

mikebr

Zen Follower

Join Date:
May 2007
Posts:
124
Plugin Contributions:
0

Re: Ask A Question

ZC-1.5.5e, PHP 5.6.32, Database patch level 1.5.5

Is there any way of including an image of the product the 'ask a question' is about in the email to the webmaster?

thanks in advance

16 Dec 2017, 3:02 PM
#355
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ask A Question

mikebr:

ZC-1.5.5e, PHP 5.6.32, Database patch level 1.5.5

Is there any way of including an image of the product the 'ask a question' is about in the email to the webmaster?

thanks in advance

Course its possible just depends on how you want it included. Can be attached to the document/email by adding another parameter to the zen_mail function that has either the full path to the image or just the relative path to the image or could "build" the file(s) that are to be attached. Another way is to incorporate the image into the email body message generating a link to the image that uses the full uri to reach it.

The image information is already included in the sql return, just need to use it for the desired effect.

To include as an attachment around line 103 change:

    zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg,'contact_us');

to:

    zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg,'contact_us'[B], DIR_FS_CATALOG . DIR_WS_IMAGES . $product_info->fields['products_image'][/B]);

To incorporate in the email as part of the "text" recommended methods have been to build an html image tag with the image referenced within the tag as if to get to it via URL: ie. https: // your store . com/ images / my-email-img.jpg

This can be done with zen_href_link to build the address and some additional text in either/both the text version and the html version of the email. Then for the html version it may just be better to create a separate variable to be populated instead of "cramming" in with text and the added difficulty of manipulating it, but to each their own.

Incorporating the image into the plain text message (at least the uri is generated) would be by changing:

    // Prepare Text-only portion of message
    $text_message = OFFICE_FROM . "\t" . $name . "\n" .
    OFFICE_EMAIL . "\t" . $email_address . "\n" .
    PROD_NAME . "\t" . $product_info->fields['products_name'] . "\n" .  
    zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$_GET['products_id']) .
    "\n\n" .  

    '------------------------------------------------------' . "\n\n" .
    strip_tags($_POST['enquiry']) .  "\n\n" .
    '------------------------------------------------------' . "\n\n" .
    $extra_info['TEXT'];

To:

    // Prepare Text-only portion of message
    $text_message = OFFICE_FROM . "\t" . $name . "\n" .
    OFFICE_EMAIL . "\t" . $email_address . "\n" .
    PROD_NAME . "\t" . $product_info->fields['products_name'] . "\n" .  
[B]    zen_image(($request_type == 'SSL' ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG) . DIR_WS_IMAGES . $product_info->fields['products_image'], $product_info->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . "\n" .
[/B]    zen_href_link(zen_get_info_page((int)$_GET['products_id']), 'products_id=' . (int)$_GET['products_id']) .
    "\n\n" .  

    '------------------------------------------------------' . "\n\n" .
    strip_tags($_POST['enquiry']) .  "\n\n" .
    '------------------------------------------------------' . "\n\n" .
    $extra_info['TEXT'];

The HTML email message could be modified as follows (or any other way as well):
from:

    // Prepare HTML-portion of message
    $html_msg['EMAIL_MESSAGE_HTML'] = '<b>Product: </b><a href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$_GET['products_id']) . '">' . $product_info->fields['products_name'] . '</a><br />' . strip_tags($_POST['enquiry']);

To:

    // Prepare HTML-portion of message
    $html_msg['EMAIL_MESSAGE_HTML'] = '<b>Product: </b><a href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$_GET['products_id']) . '">' . $product_info->fields['products_name'] . [B]zen_image(($request_type == 'SSL' ?  HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG) .  DIR_WS_IMAGES . $product_info->fields['products_image'],  $product_info->fields['products_name'], SMALL_IMAGE_WIDTH,  SMALL_IMAGE_HEIGHT) . [/B]'</a><br />' . strip_tags($_POST['enquiry']);

This puts the image after (may end up below or to the right of) the product's name. Include additional surrounding html tags to support improved/easier css handling.

Hope that helps. Note, images are not likely to be displayed in the non-html version of the email... Afterall, supposed to be plain text right? to generate just the link, well, would use: ```
// Prepare Text-only portion of message
$text_message = OFFICE_FROM . "\t" . $name . "\n" .
OFFICE_EMAIL . "\t" . $email_address . "\n" .
PROD_NAME . "\t" . $product_info->fields['products_name'] . "\n" .
[B] ($request_type == 'SSL' ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG) . DIR_WS_IMAGES . $product_info->fields['products_image'] . "\n" .
[/B] zen_href_link(zen_get_info_page((int)$_GET['products_id']), 'products_id=' . (int)$_GET['products_id']) .
"\n\n" .

'------------------------------------------------------' . "\n\n" .
strip_tags($_POST['enquiry']) .  "\n\n" .
'------------------------------------------------------' . "\n\n" .
$extra_info['TEXT'];($request_type == 'SSL' ?  HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG) .  DIR_WS_IMAGES . $product_info->fields['products_image']

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

16 Dec 2017, 4:03 PM
#356
mikebr avatar

mikebr

Zen Follower

Join Date:
May 2007
Posts:
124
Plugin Contributions:
0

Re: Ask A Question

Thanks so much
the attachment method works great.

16 Dec 2017, 4:30 PM
#357
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ask A Question

mikebr:

Thanks so much
the attachment method works great.
Thanks for the update/report. Glad that method resolves the concern. Were any of the other methods attempted and if so issues found that need to be corrected?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

29 Jan 2018, 2:47 AM
#358
tmccaff avatar

tmccaff

Zen Follower

Join Date:
Jan 2018
Posts:
157
Plugin Contributions:
0

Re: Ask A Question

This works great only problem I am having is showing the image of the button. I am using responsive classic template on 1.5.5f

I uploaded button_ask_question.gif to includes/templates_default/buttons/English

I uploaded ask_a_question_defines.php to includes/languages/English

and button displays but not the image I wanted. What am I doing wrong?

29 Jan 2018, 11:27 AM
#359
swguy avatar

swguy

Administrator

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

Re: Ask A Question

Right click on the button and use your browser's "Open Image in New Tab" function (this is what it's called in Chrome; might be different in your browser.) Then you'll see where the image is being pulled from. This will help you narrow down what's happening.

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.

29 Jan 2018, 11:57 AM
#360
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Ask A Question

tmccaff:

This works great only problem I am having is showing the image of the button. I am using responsive classic template on 1.5.5f

I uploaded button_ask_question.gif to includes/templates_default/buttons/English

I uploaded ask_a_question_defines.php to includes/languages/English

and button displays but not the image I wanted. What am I doing wrong?

swguy:

Right click on the button and use your browser's "Open Image in New Tab" function (this is what it's called in Chrome; might be different in your browser.) Then you'll see where the image is being pulled from. This will help you narrow down what's happening.
As answered in the other posting of this issue, the button-image is not being displayed because the store is set up to use CSS buttons.