Set Price as Free

OK I have been working with CS-Cart for a while but I can't for the life of me figure this one out. I have some products that are electronically distributed that I want to make free. When I make them 0.00 as price, even though there is a list price, no price shows up at all since I have the Zero price action set to allow user to add to cart. The other options don't seem to be useful for this purpose as I want them to add it to the cart so do not allow use to add to cart isn't an option. I also don't want the user to name their price so that doesn't work. So how do I have hit show List price 9.99 and then Price FREE or even 0.00 (FREE would be preferred). I would want this behavior on both listing pages and detail pages. I know I can use discounts but a price will still show (and get removed once added to cart) which is confusing to the customer.

skins//customer/commom_templates/product_data.tpl



add: {if $product.price == 0.00 }Free{/if}



John

[quote name=‘JohnCarroll’ timestamp=‘1315929355’ post=‘121588’]

skins//customer/commom_templates/product_data.tpl



add: {if $product.price == 0.00 }Free{/if}



John

[/quote]



Thank you. You are a gentleman and a scholar :)

But I can’t figure out what to put the price as, when I put the price as $0.00 the price doesn’t go up no matter how many you tick off…I tried putting $0.01 as the price and that works but it’s tacky…Solution?



See:

[quote name='bjm@catholicism.org' timestamp='1316115508' post='121738']

But I can't figure out what to put the price as, when I put the price as $0.00 the price doesn't go up no matter how many you tick off…I tried putting $0.01 as the price and that works but it's tacky…Solution?



See:

http://forum.cs-cart…product-option/

[/quote]





If you are doing a free product then why would the price go up?

Perhaps the best way to explain is look at what I have:

http://store.catholicism.org/st-1-sunday-talks-mp3.html



http://store.catholicism.org/mp3-selection.html



I don't know how to use the configurator purely as a vehicle.

[quote name='bjm@catholicism.org' timestamp='1316217292' post='121800']

Perhaps the best way to explain is look at what I have:

http://store.catholi…-talks-mp3.html



http://store.catholi…-selection.html



I don't know how to use the configurator purely as a vehicle.

[/quote]



Ah the configurator is a different beast completely. Don't have that in use on any of my sites so I am not sure. Maybe someone else can chime in on this.

[quote name='whiplash13' timestamp='1316439133' post='121914']

Ah the configurator is a different beast completely. Don't have that in use on any of my sites so I am not sure. Maybe someone else can chime in on this.

[/quote]

Where in skins//customer/commom_templates/product_data.tpl

should I add the code?

add: {if $product.price == 0.00 }Free{/if}

[quote name='jmccann' timestamp='1316623602' post='122054']

Where in skins//customer/commom_templates/product_data.tpl

should I add the code?

add: {if $product.price == 0.00 }Free{/if}

[/quote]



It would depend on the skin. I actually chose not to put it there but instead added into the default product detail page layout and the 2 category layouts so it looked cleaner.

@whiplash13: Would you share with me what files you added the {if…} statements to in order to get the $0.00 or Free to display and still have the Add to Cart button?

[quote name='ShowStuff' timestamp='1357694974' post='152448']

@whiplash13: Would you share with me what files you added the {if…} statements to in order to get the $0.00 or Free to display and still have the Add to Cart button?

[/quote]



It depends on what Product Listing and Product Detail page layouts you are using. I use the default Product Template so the path is /skins/your skin/customer/blocks/product_templates/default_template.tpl for the product and /skins/your skin/customer/blocks/product_list_templates/products_grid.tpl and products_multicolumn.tpl. So for example in the default_template.tpl after the lines:

```php



{assign var=“rating” value=“rating_$obj_id”}{$smarty.capture.$rating}

{assign var=“sku” value=“sku_$obj_id”}{$smarty.capture.$sku}


```

I added :
```php

{if $product.price == 0.00 }




{$lang.list_price}: ${$product.list_price}


{$lang.price}: FREE


{$lang.you_save}: ${$product.list_price}(100%)




-100%



{/if}

```

FYI This was done for 2.2.4. I did something similar for the product listing page.

Thanks… I'll take a look at that in greater detail and try a few things. Much appreciated. As I dig into it, I may have a few more questions. I'm still learning much of this as I go…



I used the “Zero Price Action” drop down menu to display the Add to Cart button. Now I'm working to have the price $0.00 or FREE display in the price area as normal.

BTW, I'm using 3.0.4… forgot to mention…

Thank you… I added the code and I'm heading in the right direction…



How could I modify the custom code to have it drop down below the Product Name instead of pushing the Product Name farther to the right? Would it be adding a few more or
before the “float-left” command?

[quote name='ShowStuff' timestamp='1357699617' post='152452']

Thank you… I added the code and I'm heading in the right direction…



How could I modify the custom code to have it drop down below the Product Name instead of pushing the Product Name farther to the right? Would it be adding a few more or
before the “float-left” command?

[/quote]



Yes it would just be some formatting. Download Firebug for Firefox, if you don't have it already, and play around with the page before making actual changes to your code. I find it much easier this way.

Thanks… I'll try that…