Ask A Question

Views: 120,990

Results 321 to 340 of 399
10 Jan 2017, 2:25 AM
#321
mc12345678 avatar

mc12345678

Totally Zenned

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

Ask A Question

Just uploaded an updated version (2.1) to incorporate that direction in the README.txt file. When it has been fully reviewed/accepted it will be available from here.

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

17 Jan 2017, 10:54 PM
#322
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ask A Question

mc12345678:

Just uploaded an updated version (2.1) to incorporate that direction in the README.txt file. When it has been fully reviewed/accepted it will be available from here.
Version 2.1 is now available from here.

Again, only the instruction was updated/modified to explain to attempt to access the page using 'SSL', the code associated with the plugin's operation was not modified.

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

18 Jan 2017, 2:05 AM
#323
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ask A Question

FYI, re-reviewed the code a little. While the modification of the calling code to request that the page be loaded using the SSL is a definite help/good start, I found that in the header code, if the site had ENABLE_SSL set to true and the page was not requested to be served using the SSL, then it would redirect to the contact_us page... This code is an issue beginning at line 121 of: includes/modules/pages/ask_a_question/header_php.php

The line was:

if (ENABLE_SSL == 'true' && $request_type != 'SSL') {
  zen_redirect(zen_href_link(FILENAME_CONTACT_US, '', 'SSL'));
}

and should be changed to:

if (ENABLE_SSL == 'true' && $request_type != 'SSL') {
  zen_redirect(zen_href_link(FILENAME_ASK_A_QUESTION, zen_get_all_get_params(), 'SSL'));
}

As will be seen in Version 2.2 of this plugin that has just been uploaded and will be available from here once it has been reviewed and posted.

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

24 Jan 2017, 6:39 PM
#324
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ask A Question

mc12345678:

FYI, re-reviewed the code a little. While the modification of the calling code to request that the page be loaded using the SSL is a definite help/good start, I found that in the header code, if the site had ENABLE_SSL set to true and the page was not requested to be served using the SSL, then it would redirect to the contact_us page... This code is an issue beginning at line 121 of: includes/modules/pages/ask_a_question/header_php.php

The line was:

if (ENABLE_SSL == 'true' && $request_type != 'SSL') {
zen_redirect(zen_href_link(FILENAME_CONTACT_US, '', 'SSL'));
}

> and should be changed to:
> ```
if (ENABLE_SSL == 'true' && $request_type != 'SSL') {
  zen_redirect(zen_href_link(FILENAME_ASK_A_QUESTION, zen_get_all_get_params(), 'SSL'));
}

As will be seen in Version 2.2 of this plugin that has just been uploaded and will be available from here once it has been reviewed and posted.
Version 2.2 of the plugin is available from here.

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

17 Mar 2017, 6:10 PM
#325
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Ask A Question

1.5.5d
latest version of Ask a Q.
getting error log:

Request URI: /, IP address: *******
#1 header() called at [/home/***/public_html/includes/templates/custom/common/html_header.php:17]
#2 require(/home/***/public_html/includes/templates/custom/common/html_header.php) called at [/home/***/public_html/index.php:43]

 PHP Warning: Cannot modify header information - headers already sent by (output started at /home/***/public_html/includes/languages/english/extra_definitions/digi/ask_a_question_defines.php:15) in /home/***/public_html/includes/templates/custom/common/html_header.php on line 17

TIA

17 Mar 2017, 7:39 PM
#326
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ask A Question

picandnix:

1.5.5d
latest version of Ask a Q.
getting error log:

Request URI: /, IP address: *******
#1 header() called at [/home//public_html/includes/templates/custom/common/html_header.php:17]
#2 require(/home/
/public_html/includes/templates/custom/common/html_header.php) called at [/home/***/public_html/index.php:43]

PHP Warning: Cannot modify header information - headers already sent by (output started at /home//public_html/includes/languages/english/extra_definitions/digi/ask_a_question_defines.php:15) in /home//public_html/includes/templates/custom/common/html_header.php on line 17

> 
> TIA

Cleanest resolution appears to be to remove the closing PHP tag ( **?>** ) at the end of includes/languages/english/extra_definitions/ask_a_question_defines.php.  This will also then "remove" the additional line entry that appears after that.  The "additional" line can remain, it is just that it currently appears after the closing PHP tag.

Thanks for pointing out that issue. If it doesn't prevent the warning from occurring, it still doesn't hurt to remove it as described.

[Warning: Headers already sent...](https://www.zen-cart.com/content.php?129-warning-headers-already-sent)

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

17 Mar 2017, 9:48 PM
#327
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Ask A Question

mc12345678:

Cleanest resolution appears to be to remove the closing PHP tag ( ?> ) at the end of includes/languages/english/extra_definitions/ask_a_question_defines.php. This will also then "remove" the additional line entry that appears after that. The "additional" line can remain, it is just that it currently appears after the closing PHP tag.

Thanks for pointing out that issue. If it doesn't prevent the warning from occurring, it still doesn't hurt to remove it as described.

Warning: Headers already sent...

So far so good :cool:

17 Mar 2017, 10:35 PM
#328
swguy avatar

swguy

Administrator

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

Re: Ask A Question

@picandnix This issue does not occur in a fresh download; you accidentally added a line after the closing ?> in the file
includes/languages/english/extra_definitions/custom/ask_a_question_defines.php

Zen Cart core has stopped putting a final ?> at the end of files for this very reason - it's such an easy accidental mistake to make.

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.

18 Mar 2017, 3:15 PM
#329
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Ask A Question

swguy:

@picandnix This issue does not occur in a fresh download; you accidentally added a line after the closing ?> in the file
includes/languages/english/extra_definitions/custom/ask_a_question_defines.php

Zen Cart core has stopped putting a final ?> at the end of files for this very reason - it's such an easy accidental mistake to make.

Thank you both :cheers:

3 Apr 2017, 1:19 PM
#330
maynards avatar

maynards

Zen Follower

Join Date:
Feb 2010
Location:
Minnesota
Posts:
392
Plugin Contributions:
0

Re: Ask A Question

I have added this plugin and do not get the option of asking a question on product pages. This is a very simple plugin to add but where did I go wrong.
I am using zencart version 155e with a template of westminster_new.

Any ideas?

Thanks in advance

3 Apr 2017, 1:57 PM
#331
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ask A Question

Maynards:

I have added this plugin and do not get the option of asking a question on product pages. This is a very simple plugin to add but where did I go wrong.
I am using zencart version 155e with a template of westminster_new.

Any ideas?

Thanks in advance

Typically and I love how so many different plugins do things differently and regardless the method of explaining/doing, none is "right", but the README.txt indicates how to "present" the option:

Move includes/templates/template_default/templates/tpl_product_info_display.php
to your own template directory, if it's not already there.
In this file, find: <!-- eof Product details list -->

On the following line, insert this block of code:

<span id="productQuestions" class="biggerText"> <br /> <b><?php echo '<a href="' . zen_href_link(FILENAME_ASK_A_QUESTION, 'products_id=' . $_GET['products_id'], 'SSL') . '">' . ASK_A_QUESTION . '</a>'; ?></b> </span> <br class="clearBoth" />

Alternately, you may use the button provided. To do this, insert

<div id="askQuestion" class="biggerText"> <?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>'; ?></div> <br /> <br class="clearBoth" />

That is the "link" to the software being installed and the option being presented...

How/where otherwise within your code/site you place this is up to your desire, but it is a starting point that works. :)

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

3 Apr 2017, 2:23 PM
#332
maynards avatar

maynards

Zen Follower

Join Date:
Feb 2010
Location:
Minnesota
Posts:
392
Plugin Contributions:
0

Re: Ask A Question

Thanks mc12345678 for your response.
Not understanding every word you wrote but I did add the code in the Read me file and I put it in here:

includes/templates/westminster_new/templates/tpl_product_info_display.php

In my current site I have this plugin that is used often by customers. I see the Ask a Question button next to each product. I do not see it here.

3 Apr 2017, 3:01 PM
#333
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ask A Question

Maynards:

Thanks mc12345678 for your response.
Not understanding every word you wrote but I did add the code in the Read me file and I put it in here:

includes/templates/westminster_new/templates/tpl_product_info_display.php

In my current site I have this plugin that is used often by customers. I see the Ask a Question button next to each product. I do not see it here.
Sorry to have offered what was considered the obvious reason. Next up would be to look at the source code of an affected product page, to see that one of the two options is presented there and if so then deal with whatever css/javascript is hiding it... it may require moving the code to a different location within the file to be outside of the effects of either of those two.

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

3 Apr 2017, 4:01 PM
#334
maynards avatar

maynards

Zen Follower

Join Date:
Feb 2010
Location:
Minnesota
Posts:
392
Plugin Contributions:
0

Re: Ask A Question

mc12345678:

Sorry to have offered what was considered the obvious reason. Next up would be to look at the source code of an affected product page, to see that one of the two options is presented there and if so then deal with whatever css/javascript is hiding it... it may require moving the code to a different location within the file to be outside of the effects of either of those two.

Thank you very much for your help. I added the code under the <!--eof Product description --> instead of <!-- eof Product details list --> and it works perfectly.

Just in case anyone else has this problem.

3 Apr 2017, 4:14 PM
#335
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ask A Question

Maynards:

Thank you very much for your help. I added the code under the <!--eof Product description --> instead of <!-- eof Product details list --> and it works perfectly.

Just in case anyone else has this problem.

Welcome. :)

And as to the other discussion that turned out to be confusing... See the original thought was that the code from the README didn't get inserted... Had that been correct then what I was saying was that this plugin was written to provide direction on where to insert some code to make the feature accessible. Other plugins provide a copy of the original file and some sort of notation that a change is needed at a certain point in the file, some give mixes of the two, etc... Well, I jumped the gun a little in thinking that the code hadn't been incorporated even though the referenced template likely has/had other modifications that could tuck the results away a little... But, seemed like the most likely cause with a secondary being where within the page... If it had gotten any more complex than either of those two then probably would have started asking for a web page. :)

Regardless, glad it was able to be easily resolved, and thank you for your patience and continued professionalism in not expressing that I was possibly mistreating you and/or your experience. The information provided back helped significantly to guide towards a solution. :)

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

23 May 2017, 1:57 AM
#336
gsallen101289 avatar

gsallen101289

New Zenner

Join Date:
Aug 2009
Posts:
44
Plugin Contributions:
0

Re: Ask A Question

I am in a bit of a funk. I am using this addon but when enabled I get no image only the "ask a question..." text and above that it reads in all caps a similar message however they both link to different pages. I am not sure what I did honestly. URL http://completelydevoteddesigns.com/index.php?main_page=product_info&cPath=6_9&products_id=8

Any thoughts would be appreciated!

23 May 2017, 2:36 AM
#337
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ask A Question

gsallen101289:

I am in a bit of a funk. I am using this addon but when enabled I get no image only the "ask a question..." text and above that it reads in all caps a similar message however they both link to different pages. I am not sure what I did honestly. URL http://completelydevoteddesigns.com/index.php?main_page=product_info&cPath=6_9&products_id=8

Any thoughts would be appreciated!

Couple thoughts, though not entirely sure how it "happened".
I accessed the site using a mobile device. There was no text that specified the ability to ask a question about the product on screen, but review of the source code identified that the ask a question content was in one way or another inserted into a sidebox. That sidebox; however, also has some "remnant" of a review link such as to offer a review of a product. That would be why the two links go to somewhere different.

Not sure (yet) what the issue to resolve is, but if a sidebox was generated to show this option and there is "text" that is all caps, no spaces, that looks "wrong" then there probably is a language define that is missing for the sidebox. The link destination difference is because of how/what was incorporated and something similar for the lack of image. The text instructions in the download identify at least two ways that the plugin can be implemented. Many more are possible, but when having difficulty doing something not described, would suggest going back to what is known to work and then if necessary branch out from there and imitate what works.

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

24 May 2017, 3:33 AM
#338
gsallen101289 avatar

gsallen101289

New Zenner

Join Date:
Aug 2009
Posts:
44
Plugin Contributions:
0

Re: Ask A Question

mc12345678:

Couple thoughts, though not entirely sure how it "happened".
I accessed the site using a mobile device. There was no text that specified the ability to ask a question about the product on screen, but review of the source code identified that the ask a question content was in one way or another inserted into a sidebox. That sidebox; however, also has some "remnant" of a review link such as to offer a review of a product. That would be why the two links go to somewhere different.

Not sure (yet) what the issue to resolve is, but if a sidebox was generated to show this option and there is "text" that is all caps, no spaces, that looks "wrong" then there probably is a language define that is missing for the sidebox. The link destination difference is because of how/what was incorporated and something similar for the lack of image. The text instructions in the download identify at least two ways that the plugin can be implemented. Many more are possible, but when having difficulty doing something not described, would suggest going back to what is known to work and then if necessary branch out from there and imitate what works.

Thank you for the response. I can only assume this happened when uploading all of the files for this add-on. I have been through each individual file related to this add-on and still no luck. Somewhere this side box is pointing to the "reviews" page and I cant seem to find it. I have removed all files and uploaded them again as before. All original files are correctly pointing where they need to.

I guess I will just turn this off until I can resolve it.

24 May 2017, 3:53 AM
#339
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ask A Question

gsallen101289:

Thank you for the response. I can only assume this happened when uploading all of the files for this add-on. I have been through each individual file related to this add-on and still no luck. Somewhere this side box is pointing to the "reviews" page and I cant seem to find it. I have removed all files and uploaded them again as before. All original files are correctly pointing where they need to.

I guess I will just turn this off until I can resolve it.

The file that is a "problem" is outside the fileset that comes with this download. It happened in some other edit or by leaving something else behind during some upgrade or another. This plugin does not include any sidebox content. To find the "issue" (which has nothing to do with the instructions of this module because this module does not install/create a sidebox especially one which is currently incorrectly coded) and assuming that some semblance of appropriate incorporation was used, would suggest removing the files associated with this download and then using the developers toolkit to search for FILENAME_ASK_A_QUESTION. Or leave the files and do the same but looking for the file(s) that are not included in the original fileset...

Or maybe search for: askaquestionsideboxHeading
and see what file(s) are returned. More than likely have a ```
zen_href_link(FILENAME_REVIEWS...

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

24 May 2017, 4:06 AM
#340
gsallen101289 avatar

gsallen101289

New Zenner

Join Date:
Aug 2009
Posts:
44
Plugin Contributions:
0

Re: Ask A Question

mc12345678:

The file that is a "problem" is outside the fileset that comes with this download. It happened in some other edit or by leaving something else behind during some upgrade or another. This plugin does not include any sidebox content. To find the "issue" (which has nothing to do with the instructions of this module because this module does not install/create a sidebox especially one which is currently incorrectly coded) and assuming that some semblance of appropriate incorporation was used, would suggest removing the files associated with this download and then using the developers toolkit to search for FILENAME_ASK_A_QUESTION. Or leave the files and do the same but looking for the file(s) that are not included in the original fileset...

Or maybe search for: askaquestionsideboxHeading
and see what file(s) are returned. More than likely have a ```
zen_href_link(FILENAME_REVIEWS...


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.