Zen Cart Logo
Forums / All Other Contributions/Addons / Request Quote link enhancement

Request Quote link enhancement

Locked

Views: 5,663

Results 1 to 20 of 22
This thread is locked. New replies are disabled.
11 Jun 2007, 8:03 PM
#1
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

Request Quote link enhancement

On the product pages that are 'call for price', there's a Request Quote link that goes to the contact page.
I want it to pass the product ID (or something else that identifies it) to the contact page, and for it to be put in the subject field of the email I receive.
I get too many emails saying just 'Please Quote'.
Thanks
Pa

13 Jun 2007, 9:57 PM
#2
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Request Quote link enhancement

I have never heard of something like this before. Does this feature comes from a particular MOD ? If so, would it be possible to point out the precise URL (clickable download link) on where this might be located ? If so, I could take a look at it.

14 Jun 2007, 7:46 AM
#3
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

Re: Request Quote link enhancement

TheOracle:

I have never heard of something like this before. Does this feature comes from a particular MOD ? If so, would it be possible to point out the precise URL (clickable download link) on where this might be located ? If so, I could take a look at it.
No, not from a mod at all, its an original ZC function (or lack of it!!). Perhaps I'm not being clear.
If one sets a product as 'Call for Price', in the catalog you get a 'Call for price' link in the appropriate product pages, and that link goes to the contact form.
If there are several 'call for price' products, the potential customer has to specify which product he wants a quote on, which often he doesn't.
I'm asking that the product model data be included in the 'call for price' link and that be automatically embedded into the contact form, either as a subject field, or a hidden field, or whatever.
Cheers
Pa

14 Jun 2007, 9:52 AM
#4
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Request Quote link enhancement

May be better add to email referring info? So, if you come to "Contact Us" page from products_info page, you can see in email
"Referring page - http://zz.zz/index.php?main_page=product_info&products_id=XX"

14 Jun 2007, 10:06 AM
#5
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

Re: Request Quote link enhancement

a_berezin:

May be better add to email referring info? So, if you come to "Contact Us" page from products_info page, you can see in email
"Referring page - http://zz.zz/index.php?main_page=product_info&products_id=XX"

Yeah - that would do it. Any suggestion on how or what to code to achieve this?

Pa

15 Jun 2007, 3:24 AM
#6
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Request Quote link enhancement

If I may ask before posting the actual solution ... wouldn't be the same to use a Report a product feature ? :wink2:

15 Jun 2007, 8:04 AM
#7
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

Re: Request Quote link enhancement

TheOracle:

If I may ask before posting the actual solution ... wouldn't be the same to use a Report a product feature ? :wink2:
Dunno - Is this a ZC feature I've not come across yet?
Please point me to it.
Thx
Pa

15 Jun 2007, 11:21 AM
#8
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Request Quote link enhancement

Add referring info to contact us email.

  1. tpl_contact_us_default.php
    Find ~78 line
<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>

Add after

<!-- // BOF Referrer page -->
<?php echo zen_draw_hidden_field('referrer', ($error ? zen_db_prepare_input($_POST['referrer']) : (isset($_SERVER['HTTP_REFERER']) ? zen_db_prepare_input(urldecode($_SERVER['HTTP_REFERER'])) : ''))); ?>
<!-- // EOF Referrer page -->
  1. contact_us/header_php.php
    Find ~50
$extra_info = email_collect_extra_info($name, $email_address, $customer_name, $customer_email);

Add after

// BOF Referrer page
   define('OFFICE_REFERRER', 'Referrer page:');
   $referrer = zen_db_prepare_input($_POST['referrer']);
   $extra_info['TEXT'] .= OFFICE_REFERRER . "\t" . $referrer . "\n\n";
   $extra_info['HTML'] .= '<table class="extra-info"><tr><td class="extra-info-bold">' . OFFICE_REFERRER . '</td><td>' . $referrer . '</td></tr>' . '</table>';
// EOF Referrer page
15 Jun 2007, 1:44 PM
#9
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

Re: Request Quote link enhancement

Thanks Andrew - Much appreciated.
I tried it on my test site and it works fine.
However, the product can only be identified if they 'Requested a Quote' from the product page. Unfortunately, the link also appears on the Category page against each product, so if requested from there, I still cannot identify the product from this info (assuming there is more than one product).

But its a step in the right direction ;-)
Thanks Again
Pa

16 Jun 2007, 4:12 AM
#10
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Request Quote link enhancement

Must be in the archived section regarding the report a product feature ... if it isn't there no more, I will recode it. In the mean time, I do not think the old one was meant to work on Zen-Cart v1.3x ... I will keep this topic updated when done. :smile:

16 Jun 2007, 6:53 AM
#11
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Request Quote link enhancement

pasher:

Unfortunately, the link also appears on the Category page against each product, so if requested from there, I still cannot identify the product from this info (assuming there is more than one product).
No problem!

  1. functions_general.php
    Find ~1126 line:
return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' .  TEXT_SHOWCASE_ONLY . '</a>';

Replace by

// BOF Add products_id to Contact Us "Button"
//    return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' .  TEXT_SHOWCASE_ONLY . '</a>';
      return '<a href="' . zen_href_link(FILENAME_CONTACT_US, 'products_id=' . $product_id) . '">' .  TEXT_SHOWCASE_ONLY . '</a>';
// EOF Add products_id to Contact Us "Button"

Find ~1136 line:

$return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';

Replace by

// BOF Add products_id to Contact Us "Button"
//    $return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
      $return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US, 'products_id=' . $product_id) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
// EOF Add products_id to Contact Us "Button"
  1. tpl_contact_us_default.php
    Find ~78 line
<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>

Add after

<!-- // BOF Add products_id to Contact Us "Button" -->
<?php echo zen_draw_hidden_field('products_id', ($error ? (int)$_POST['products_id'] : (isset($_GET['products_id']) ? (int)$_GET['products_id'] : 0))); ?>
<!-- // EOF Add products_id to Contact Us "Button" -->
  1. contact_us/header_php.php
    Find ~69
zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg,'contact_us');

Replace by

// BOF Add products_id to Contact Us "Button"
    if((int)$_POST['products_id'] > 0) {
      define('EMAIL_SUBJECT_PRODUCTS_ID', ' Get info about product ');
      $email_subject = EMAIL_SUBJECT . EMAIL_SUBJECT_PRODUCTS_ID . zen_get_products_name((int)$_POST['products_id']) . ' (' . (int)$_POST['products_id'] . ')';
      zen_mail($send_to_name, $send_to_email, $email_subject, $text_message, $name, $email_address, $html_msg,'contact_us');
    } else
// EOF Add products_id to Contact Us "Button"
    zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg,'contact_us');

Better remove

define('OFFICE_REFERRER', 'Referrer page:');

and

define('EMAIL_SUBJECT_PRODUCTS_ID', ' Get info about product ');

to extra_definitions languages file.

16 Jun 2007, 1:02 PM
#12
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Request Quote link enhancement

One place missing - into the contact us email template. :wink2:

16 Jun 2007, 1:14 PM
#13
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Request Quote link enhancement

No any changes in the contact us email template nedeed :lamo:

16 Jun 2007, 2:20 PM
#14
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Request Quote link enhancement

define('EMAIL_SUBJECT_PRODUCTS_ID', ' Get info about product ');

Also, if you put the definition under the modules straight, it will only display in english in this case. :lamo:

16 Jun 2007, 4:00 PM
#15
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Request Quote link enhancement

Wow! You are not able to read?

a_berezin:

Better remove

define('OFFICE_REFERRER', 'Referrer page:');

> and
> ```
define('EMAIL_SUBJECT_PRODUCTS_ID', ' Get info about product ');

to extra_definitions languages file.

16 Jun 2007, 4:14 PM
#16
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Request Quote link enhancement

Wow! You are not able to read?

Is that so ? Then perhaps you could explain on why you're suggesting to remove these two lines from the extra_definitions folder rather than move these definitions into the extra_definitions folder due to languages issues ?

16 Jun 2007, 4:40 PM
#17
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Request Quote link enhancement

I am not going to you something to explain.
You nothing can tell in essence, only stupid comments.

16 Jun 2007, 4:42 PM
#18
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Request Quote link enhancement

If it's your point of vue ... perhaps you'd like to read it again above. However, I do notice you're also experiencing difficulties in english. That said, there's no need to go further due to the obvious.

16 Jun 2007, 6:45 PM
#19
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Request Quote link enhancement

I believe Andrew meant to say> Better remove

define('OFFICE_REFERRER', 'Referrer page:');

> 
> and *ADD*
> ```
define('EMAIL_SUBJECT_PRODUCTS_ID', ' Get info about product ');

to extra_definitions languages file.

Actually, no, on rereading it, I see that he means move both definitions to extra_definitions. It is correct but unusual English, complicated by the code tag format, and would have a bit clearer by saying "move" instead of "remove".

18 Jun 2007, 9:38 AM
#20
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

Re: Request Quote link enhancement

Thanks for the responses - I'll be trying out Andrew's further bits of code.

*Must be in the archived section regarding the report a product feature ... if it isn't there no more, I will recode it. In the mean time, I do not think the old one was meant to work on Zen-Cart v1.3x ... I will keep this topic updated when done. *

Does that mean that it'll be coming in a future release of ZC?