Zen Cart Logo
Forums / All Other Contributions/Addons / Ask A Question/ Contact Us Hybrid

Ask A Question/ Contact Us Hybrid

Views: 1,658

Results 1 to 12 of 12
7 Dec 2012, 8:06 PM
#1
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Ask A Question/ Contact Us Hybrid

Our store sells vintage wholesale used clothing/shoes which is limited in availability.

When a customer wants to purchase a dozen or so of vintage goods, they would have to inquire if it is currently available, if it is, transactions are done through invoicing, and if it is not available, they will have to be on a wait list.

So I want to set up the store to be showcase with prices. The customer will see how much a certain lot of vintage items cost, then they would have to click to contact us to check if it is available or be queued into a wait list.

The current default zen cart for showcase with prices is to have a universal contact us button on the product. This will take the customer to the contact us form and once an email is sent, unless they mention it on their email, we will have to go back and ask which lot they are interested in.

I like the way Ask a Question works where it picks up the product information and sends those along with the email so you know exactly what the customer is looking at.

However I do not want to have 2 buttons there, is there an easy way to create a Ask a Question hybrid on the product info page. So that the "Contact Us" button will actually be the Ask a Question Module working in the background? I'm thinking it would be just replacing a line in the product_info_display template to point to the ask a question module instead of the contact us form.

Anyone knowledgeable in code, please share your input? Thanks!

7 Dec 2012, 9:01 PM
#2
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: Ask A Question/ Contact Us Hybrid

Not having any success finding any llink on the product_info page, I poked around on the other files and found this on the functions_general.php

// show case only superceeds all other settings

if (STORE_STATUS != '0') {

  return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' .  TEXT_SHOWCASE_ONLY . '</a>';

}

Where you have the FILENAME_CONTACT_US, can this be replaced with FILENAME_ASK_A_QUESTION and then have that button go to the Ask a Question form for every product page?

8 Dec 2012, 3:47 AM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Ask A Question/ Contact Us Hybrid

Instead of making the changes to the product _info page ... you could try customizing the function zen_get_buy_now_button in the file:
/includes/functions/functions_general.php

with the code in RED:

    case ($button_check->fields['product_is_call'] == '1'):
[B]// [/B]     $return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
[B]      $return_button = '<a href="' . zen_href_link(FILENAME_ASK_A_QUESTION, 'products_id=' . (int)$product_id) . '">' . zen_image_button(BUTTON_IMAGE_ASK_A_QUESTION, BUTTON_ASK_A_QUESTION_ALT) . '</a>';
[/B]

and this will change the Add to Cart/Buy Now to be the ASK image instead and take them to the form to fill out for it ...

10 Dec 2012, 3:11 PM
#4
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: Ask A Question/ Contact Us Hybrid

Hello Ajeh,

Thanks for your help! I noticed that what this will actually do is replace the Contact Us button to Ask a Question when product is call for price. The thing is, I want to show the price there but instead of having the contact us button on it, it would go to Ask a Question.

I'm looking at the coding where there is the showroom only part but can't seem to figure out where to stick the Ask A Question button instead of the Contact us where the product will still show prices.

Ajeh:

Instead of making the changes to the product _info page ... you could try customizing the function zen_get_buy_now_button in the file:
/includes/functions/functions_general.php

with the code in RED:

case ($button_check->fields['product_is_call'] == '1'):

[B]// [/B] $return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
[B] $return_button = '<a href="' . zen_href_link(FILENAME_ASK_A_QUESTION, 'products_id=' . (int)$product_id) . '">' . zen_image_button(BUTTON_IMAGE_ASK_A_QUESTION, BUTTON_ASK_A_QUESTION_ALT) . '</a>';
[/B]

> 
> and this will change the Add to Cart/Buy Now to be the ASK image instead and take them to the form to fill out for it ...
10 Dec 2012, 3:16 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Ask A Question/ Contact Us Hybrid

This code is not removing any price(s) that you have on Products marked as Call for price (price_is_call 1) ... this is only changing the buttons/links from Contact Us to the Ask a Question image ...

Where are you losing the price on your Products?

10 Dec 2012, 3:40 PM
#6
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: Ask A Question/ Contact Us Hybrid

Sorry about that, so I tried the code out and it does not seem to work. I have the price and the Ask a question link which works, but the contact us link still shows on the product page. How do I just comment out the contact us link instead? Probably simpler that way?

Here is the link so you know what I am talking about:
http://www.makemytable.com/wsvintage/index.php?main_page=product_info&cPath=2&products_id=6

10 Dec 2012, 4:01 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Ask A Question/ Contact Us Hybrid

I would look to see that you did the change on the function that I posted then try a quick switch to the Classic Template to see if it is your template that is not using this ...

The change on the function zen_get_buy_now_button should be changing the link for all Products that are product_is_call 1 to use the Ask a Question link and you should no longer see the Contact Us link at all anywhere in listings nor in product _info ...

10 Dec 2012, 4:32 PM
#8
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: Ask A Question/ Contact Us Hybrid

Ok finally figured it out.

This is what I did.

Firstly, my store was Showcase only with prices, so I changed this to a normal store. Then the "Ask a Question" button appeared.

Then, when product is call for price, I could not get rid of the button image or text that says "Call for Price". Apparently there is another file that controls this.

Functions_prices.php -- I commented out line 279-283 where it states that when product is call for price show text or button. Once this was done, the Call for Price button disappeared and the only thing that remained is the ask a question button.

If there was a better way to do this, please let me know. Thanks :)

10 Dec 2012, 4:38 PM
#9
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: Ask A Question/ Contact Us Hybrid

Oh I just wanted to add, using the Call for Price function is brilliant! By doing this, if I do have a lot that can be sold, I can just switch this to normal product and the customer can actually purchase online.

Thanks for the directions!

9 Feb 2013, 7:40 PM
#10
rfree190 avatar

rfree190

Zen Follower

Join Date:
Sep 2007
Posts:
176
Plugin Contributions:
0

Re: Ask A Question/ Contact Us Hybrid

1.5.x Compatible? Or is there another "Ask a Question" plugin for 1.5.x?

Thanks!

5 Dec 2013, 8:24 AM
#11
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Ask A Question/ Contact Us Hybrid

I'm trying to find out how to have the "Contact us" link only when the stock saldo is bigger than zero.
The shop is in the mode of "Showcase no prices" and the idea is that we do show all the products (art in this case) but we do not want people to contact us when the art piece is actually sold. So, we would need the "Contact us" link appearing only when the stock saldo is NOT 0 (zero).

The situation should be about:
$flag_show_product_info_quantity == 0

any idea how to do?

5 Dec 2013, 8:35 AM
#12
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Ask A Question/ Contact Us Hybrid

ellivir:

I'm trying to find out how to have the "Contact us" link only when the stock saldo is bigger than zero.
The shop is in the mode of "Showcase no prices" and the idea is that we do show all the products (art in this case) but we do not want people to contact us when the art piece is actually sold. So, we would need the "Contact us" link appearing only when the stock saldo is NOT 0 (zero).

The situation should be about:
$flag_show_product_info_quantity == 0

any idea how to do?

I meant to write that the situation should be like
$products_quantity == 0