Ask A Question

Results 1 to 20 of 399
12 Jul 2006, 22:30
#1
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Ask A Question

I was disappointed when the mod "Ask A Question" wasn't included in 1.3, so I decided to integrate it myself. It's now listed as a contribution here:

http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_47&products_id=206

It doesn't use the database entries that the previous one did; it just reuses the email settings that Contact Us uses.

I hope other people find this as useful as I did!
Scott

PS> Unfortunately, I did not create a graphic button for it, which I think would be a great addition; if someone out there has the time and inclination to do so, I would happily include this in an update.
13 Jul 2006, 15:08
#2
johnny43 avatar

johnny43

Zen Follower

Join Date:
Feb 2006
Posts:
231
Plugin Contributions:
0

Re: Ask A Question

Great Mod, got it installed...
However for multy languages I tried replacing:

<b><?php echo '<a href="' . zen_href_link(FILENAME_ASK_A_QUESTION, 'products_id=' . $_GET['products_id']) . '">Ask a Question about this product</a>'; ?></b>

with this:
<b><?php echo '<a href="' . zen_href_link(FILENAME_ASK_A_QUESTION, 'products_id=' . $_GET['products_id']) . '"><?php echo ASK_A_QUESTION; ?></a>'; ?></b>

But did not work...obviously my php sucks..*lol*

PS Yes I did:
define('ASK_A_QUESTION', 'Ask a Question about this Product');
in the language files I needed....
13 Jul 2006, 15:24
#3
johnny43 avatar

johnny43

Zen Follower

Join Date:
Feb 2006
Posts:
231
Plugin Contributions:
0

Re: Ask A Question

Should replace with:
<b><?php echo '<a href="' . zen_href_link(FILENAME_ASK_A_QUESTION, 'products_id=' . $_GET['products_id']) . '">'.ASK_A_QUESTION.'</a>'; ?></b>

works fine now.....
13 Jul 2006, 23:09
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Ask A Question

The readme file should say

<b><?php echo '<a href="' . zen_href_link(FILENAME_ASK_A_QUESTION, 'products_id=' . $_GET['products_id']) . '">' . ASK_A_QUESTION . '</a>'; ?></b>


and the file ./includes/languages/english/extra_definitions/ask_a_question_defines.php

should be

<?php

define('ASK_A_QUESTION', 'Ask a question about this product');

?>

I will fix this next time I upload. I'm still hoping some nice person will make a button! :)
~
Thanks,
Scott
28 Jul 2006, 18:50
#5
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
0

Re: Ask A Question

Scott-

Just to clarify, the edit recommended below is a replacement for the edit recommended in the readme for includes\templates\TYOUR_TEMAPLATE\templates\tpl_product_info_display.php

The readme file should say

<b><?php echo '<a href="' . zen_href_link(FILENAME_ASK_A_QUESTION, 'products_id=' . $_GET['products_id']) . '">' . ASK_A_QUESTION . '</a>'; ?></b>

and the file
/includes/languages/english/extra_definitions/ask_a_question_defines.php
should include:

define('ASK_A_QUESTION', 'Ask a question about this product');


Also can you not incorporate the button Marg bundled with her previous version?

And is your updated version known to work on all versions of Zen Cart 1.3x. And does it work on previous 1.2x versions? Hope so as I see Marg's version is no longer available in download area.

I like your new leaner more efficient design and works well on v.1.3.0.2 (fresh install). Nice job.

Woody
28 Jul 2006, 21:29
#7
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Ask A Question

Your changes look good.

I have only verified this with 1.3.0.2; you would have to verify it with other 1.3's. And I have no idea about 1.2.

I downloaded Marg's contribution prior to it being deleted and there was no button in it. These things were all text prior to 1.3.

Good luck,
Scott
28 Jul 2006, 22:57
#8
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
0

Re: Ask A Question

swguy:

I have only verified this with 1.3.0.2; you would have to verify it with other 1.3's. And I have no idea about 1.2.


Yes that is why I was wondering why Marg's version was removed from the downloads area as it also support previous ZC versions

swguy:

I downloaded Marg's contribution prior to it being deleted and there was no button in it. These things were all text prior to 1.3.


Marg updated her "ask_a_question_v1.3.0" for 1.3x (last file change is May 24, 2006). I have it running on Zen Cart 1.3.0.1. Including the graphic button provided in that same version. Previous version from Apr 06, 2006, which also ran on ZC 1.3x also had the button included.

Button is attached.
29 Jul 2006, 00:21
#9
purple_circle avatar

purple_circle

New Zenner

Join Date:
Oct 2005
Posts:
28
Plugin Contributions:
0

Re: Ask A Question

I have installed this contribution and it works fine - except when HTML emails are slected. The emaila is still sent but there is no reference to the actual product that the question is being asked about. Any ideas as to why this is?
29 Jul 2006, 01:45
#10
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Ask A Question

With the html email, I think you'd have to add another file in the email directory ... I haven't used that so I didn't look into it.
29 Jul 2006, 01:48
#11
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Ask A Question

Re: Marg's contribution

I looked for it when I started working on this, which was only about a month ago, and didn't see it. I really can't speak to the question of its deletion; perhaps the mods can speak up.

As noted in the readme file, I ported this myself because I noticed it was missing from 1.3 and I enjoyed using it back in 1.27d.

Scott
29 Jul 2006, 03:57
#12
purple_circle avatar

purple_circle

New Zenner

Join Date:
Oct 2005
Posts:
28
Plugin Contributions:
0

Re: Ask A Question

There was no call up for the product in the HTML version of the email.
I ended up modifying /includes/modules/pages/ask_a_question/tpl_header_php.php and it all works fine now.

For anyone that is interested:
Replaced -
$html_msg['EMAIL_MESSAGE_HTML'] = strip_tags($_POST['enquiry']);

With -
$html_msg['EMAIL_MESSAGE_HTML'] = '<b>Product: </b><a href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['products_id']) . '">' . $product_info->fields['products_name'] . '</a><br />' . strip_tags($_POST['enquiry']);
29 Jul 2006, 08:01
#13
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Ask A Question

I just uploaded a version with the fixes that have been suggested plus the button that was posted. It should be available in a few days after the mods approve it.

Scott
06 Aug 2006, 09:42
#14
pivey avatar

pivey

Zen Follower

Join Date:
Mar 2006
Posts:
192
Plugin Contributions:
0

Re: Ask A Question

Would be nice to have the product image displayed as well.
Along with the product name, on the top of the mail form?

Cheers
Dimi
20 Aug 2006, 10:27
#15
maxus avatar

maxus

Zen Follower

Join Date:
Feb 2005
Posts:
130
Plugin Contributions:
0

Re: Ask A Question

Please tell me where is problem ?
http://www.czbeads.eu/seed-bead-10050-110-p-217.html?language=en

Im change tpl_product_info_display.php
but it look like alligned on the right side. I need it on the left side

ot I need put button (damn, how I can put this button - no info about it)

Pavel
23 Aug 2006, 03:10
#16
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Ask A Question

Looks like you've got it. Nice!
23 Aug 2006, 17:17
#17
maxus avatar

maxus

Zen Follower

Join Date:
Feb 2005
Posts:
130
Plugin Contributions:
0

Re: Ask A Question

Im add several <br /> codes and it help
23 Aug 2006, 21:30
#18
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Ask A Question

Probably a better solution is to use

<br class="clearBoth" />

This way your alignment will still look good even if you swap out the graphic
you're using for another one with different dimensions.

Good luck,
Scott
06 Sep 2006, 14:44
#19
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: Ask A Question

No one has explained how to add the freakin button yet.
08 Sep 2006, 07:56
#20
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Ask A Question

Assuming your template name is "custom":

a) copy the button image into includes/templates/custom/buttons/english
(create this directory if it doesn't exist).

b) create includes/languages/english/custom/button_names.php if you have not already done so,
from includes/languages/english/button_names.php

Add the lines
define('BUTTON_IMAGE_ASK_A_QUESTION','button_ask_question.gif');
define('BUTTON_ASK_A_QUESTION_ALT', 'Ask a question');

to this file.

Then, in tpl_product_info_display.php, your code would be:

<div id="askQuestion" class="biggerText">
<?php echo '<a href="' . zen_href_link(FILENAME_ASK_A_QUESTION, 'products_id=' . $_GET['products_id']) . '">' .
zen_image_button(BUTTON_IMAGE_ASK_A_QUESTION, BUTTON_ASK_A_QUESTION_ALT) . '</a>'; ?></div>
<br />
ASK_A_QUESTION
</a>
</div>
<br class="clearBoth" />

Good luck,
Scott