X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Email for Pricing (https://forum.x-cart.com/showthread.php?t=5659)

curpier 12-18-2003 12:04 PM

Email for Pricing
 
Anyone know how I can make it say "Email us for pricing" for a product. I have tried to modify the "Enter your price" option ... but had no luck. Searching did not help either.

Xcart 3.4.9

adpboss 12-18-2003 02:38 PM

More information would be nice.

curpier 12-18-2003 10:03 PM

Okay,

I would like to have no price listed, and it say "E-mail Us for Applications and Price." Basically, I'm selling a product that is vehicle specific. I don't want to list every vehicle possible. I would rather have the customer contact me via e-mail for the price.

Does this make sense?

shan 12-19-2003 04:12 AM

here you go. This was done using V3.5.x

open product.tpl and look for

Code:

{else}
<input type=text size=7 name=price>
{/if}


and change it to

Code:

{else}
Email Us For Prices
{/if}


open products.tpl and look for

Code:

{else}
<font class=ProductPrice>{$lng.lbl_enter_your_price}</font>
{/if}


and change it to

Code:

{else}
Email Us For Prices
{/if}


open products_t.tpl and find

Code:

{else}
<font class=ProductPrice>{$lng.lbl_enter_your_price}</font>
{/if}


and change to

Code:

{else}
Email Us For Prices
{/if}


leon 12-19-2003 06:12 AM

Nice hack, although I prefer to avoid email spammers and email spiders on my site.

curpier 12-19-2003 09:23 AM

Thank you so much!!! This forum has helped me more than you know!

g0t0pless 12-19-2003 02:39 PM

The "enter you price" option is used for the X-Confugrator, which is why it didn't do what you wanted it to do.

I wish I could help more.

Danielle 02-19-2005 06:54 PM

Would this work on Pro 4.0.1?

Thanks!

Danielle 03-07-2005 01:10 PM

*bump*

balinor 03-07-2005 01:12 PM

Hey Danielle....why not try it out?

Danielle 03-07-2005 01:22 PM

Yes I'm about to do that, I'm just still new to all this and it looks like a lot of code to play around with, I guess I'm just paranoid of messing something up, lol. I thought I'd just check again before I went ahead with it. But this is definitely something I want so *deep breath* here I go! I'll post if it works or not :D

balinor 03-07-2005 01:27 PM

Just save the original, nothing bad can happen :) Seriously, you'll be surprised how easy it is once you dig in!

Danielle 03-07-2005 01:36 PM

Thanks...I have played around with a few things and made some rather ummm LARGE mistakes hehe. Gotta say, I LOVE that restore button, lol.

balinor 03-07-2005 01:39 PM

Just be very careful, if you hit restore to a template you have already modified, it will go back to the ORIGINAL, default x-cart template. I usually save a back-up of the template locally and restore from that if I am using a modified template.

leon 03-21-2005 08:22 PM

Quote:

Originally Posted by balinor
Just be very careful, if you hit restore to a template you have already modified, it will go back to the ORIGINAL, default x-cart template. I usually save a back-up of the template locally and restore from that if I am using a modified template.


What I do is test the template, if its ok I overwrite the original via FTP, that way if you restore, you restore with the most updated tested version anyway.

Falkayn 11-28-2005 09:39 PM

Thank you for this solution, it has helped me today tremendously! In the spirit of Christmas sharing I thought it might be handy if I told you how I got around the SPAM problem ...

Instead of using the mailto: link, I linked it to my Contact Us page and then hacked that template to get the subject automatically populated. So for example on the products.tpl page I used:
Code:

Contact us for a price quote.

Whilst on the product.tpl page I used:
Code:

Contact us for a price quote.

In the contactus.tpl page I added this to the subject field:
Code:

<INPUT type="text" id="subject" name="subject" size="32" maxlength="128" value="{$userinfo.subject}{if $smarty.get.subject}{$smarty.get.subject}{/if}">

nfc5382 01-02-2007 07:43 PM

Re: Email for Pricing
 
How about an automated response for the price??? We have distributors that will disallow any online price discounts so it would be nice if we could automatically reply with a link to a hidden product with a discounted price or coupon code.

sammig 01-30-2007 02:56 AM

Re: Email for Pricing
 
HI, could anyone tell an x-cart newbie how to do the "email for prices" for version 4.1.5 please?

nfc5382 04-27-2007 06:51 PM

Re: Email for Pricing
 
I don't think there exists a good solution for this.

gardel 05-18-2007 07:07 PM

Re: Email for Pricing
 
If you have $0 items and don't want the customer to enter a price, here are the instructions for 4.1.7:

In Admin->Languages, add the following text topic:

Variable: txt_contact_us_for_pricing

Value:
PHP Code:

<a href="help.php?section=contactus&mode=update&subject=Requesting prices for - {{product}}">Contact us</a> for pricing



In product.tpl, replace:

PHP Code:

<input type="text" size="7" name="price" /> 


with:

PHP Code:

{$lng.txt_contact_us_for_pricing|substitute:"product":$product.product



In products.tpl, replace:

PHP Code:

<font class="ProductPrice">{$lng.lbl_enter_your_price}</font


with:

PHP Code:

<font class="ProductPrice">{$lng.txt_contact_us_for_pricing|substitute:"product":$products[product].product}</font



In contactus.tpl, replace:

PHP Code:

<input type="text" id="subject" name="subject" size="32" maxlength="128" value="{$userinfo.subject}/> 


with:

PHP Code:

<input type="text" id="subject" name="subject" size="32" maxlength="128" value="{$userinfo.subject} {if $smarty.get.subject}{$smarty.get.subject}{/if}" /> 


Disabling Add to Cart and not displaying $0 in the Wish List is left as an optional exercise for the reader.

kini25 06-04-2007 12:53 PM

Re: Email for Pricing
 
Hello
I have 4.1.7 using the new free template. I have tried to do this but can not find any of this code in the files you specified above.
Could they be in a differnent folder???

I need to be able to do this but can't find anything to edit.

Please help

FFI 07-18-2007 10:19 AM

Re: Email for Pricing
 
This has been a very helpfull thread for me. I have a client who has a few categories that he doesnt want added to his cart, so I combined a part of the following http://forum.x-cart.com/showpost.php?p=172401&postcount=20 with some info from step #4 of the first post in this thread, http://forum.x-cart.com/showthread.php?t=8881

End result is I now have removed the add to cart button for the categories that I specify and replaced it with a link that goes to the contact us form with the subject already filled in with a request for more information on that particular product. (I hope to expand it to have a default message with product ID and other info as well)

I have this working on 4.1.8, but the site is under develpoment at the moment, so I dont have a live link.

As always, you should backup before applying any mods. Use this at your own risk.

Ok, here it goes, (I am going to copy and paste some parts from the above mentioned posts)

Step #1,

In Admin->Languages, add the following text topic:

Variable: txt_contact_us_for_pricing

Code:

<a href="help.php?section=contactus&mode=update&subject=Requesting more information about - {{product}}">Request More information</a> 


You can modify the above to suit your needs.

Step #2,

Open customer/main/product.tpl and locate the following,

Code:

<td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}
</td>


and replace with the following,

Code:

<td>{if $product.categoryid  >=47 and $product.categoryid <64}{$lng.txt_contact_us_for_pricing|substitute:"product":$product.product}
{else}
{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}{/if}
</td>


Step #3,

Open help/contactus.tpl and locate the following,

Code:

<input type="text" id="subject" name="subject" size="32" maxlength="128" value="{$userinfo.subject}" />

and replace with the following code,

Code:

<input type="text" id="subject" name="subject" size="32" maxlength="128" value="{$userinfo.subject} {if $smarty.get.subject}{$smarty.get.subject}{/if}" />

The if statement in part #2 basically says that if your category is greater than or equal to 47 and less than 64, you will get a link to request more information instead of the add to cart button.

At some point, I hope to make the link into a button, and to make it work with main categories instead of the subcategories (for my need, all the categories I dont want to have the add to cart button are under the same main category). I just need to get more familiar with the software.

If anyone has any tips to offer, it would be greatly appreciated.

freemchr 04-21-2008 12:36 AM

Re: Email for Pricing
 
This is great, but it still allows the customer to add a price in the main description.. how do you stop that?

boxerbay 07-08-2008 09:11 AM

Re: Email for Pricing
 
how can we get this to work with wholesale pricing?

IE - All membership gets no pricing - request more info all price is set to ZERO
wholesale membership gets wholesale membership pricing.

boxerbay 07-08-2008 09:59 AM

Re: Email for Pricing
 
I have a feeling it could work with an if then statement that checks the customers membership. but not sure how to write it.

sort a like above in products.tpl

Code:

<td>{if MEMBERSHIP ID = ALL}{$lng.txt_contact_us_for_pricing|substitute:"product":$product.product}
{else}
{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}{/if}
</td>


where's Balinor?... lol


All times are GMT -8. The time now is 05:12 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.