Jump to content

Encouraging users to use store by offering clearly free content


Recommended Posts

As part of my buisness plan, I plan to develop several applications to be sold for free on my store to not only encourage users to use and get familliar with the interface of the store, but the quality of the free applications to convince the customer that they would want to buy a priced product.

Ath the moment you can set a product to the price of nothing, but the fact the price doesn't say "free" implys a hidden charge, and if the product is free there should be a simpler solution to go straight to downloading rather than a payment module. I have an idea of using two additional features for easy access to free products and I think this technique would help a lot of people with download orientated stores, but I have a problem with knowing where to modify the code (or a more friendly non destructive method).

My idea is to display the price of a product as "Free" if the overall price is 0.00£ so a word instead of the actual price, aswell as a tab at the bottom which says "download now" and when you click the tab inside it there is a list of links where the file is been hosted (if the download is free).

I cannot change translations to occupy a tab for the "download now" tab because they already contain important information I want to keep, and you cannot use a word as a price, so can anyone help me with a solution to this? Thanks

Link to comment
Share on other sites

Thanks for the reply. I tried incorporating that code where you previously suggested, but had no success with anything changing (code possibly from an older version). I backup my stuff commonly and am fluent with understanding most php, but maybe I should try coding a module or plug in to do this? just to avoid any core conflicts. I reckon if I take a long look at those pages functions but adapt an external script to deal with the values again.

I'll update this if I find anything useful to let people know about on trying this.

Link to comment
Share on other sites

Ok I have a working skeleton of a tools module, that saves the parameters needed for this module and allows them to be modified on a configuration page on the back office that has the following.

Freemium content access
       <form action="/prestashop/admin_area/index.php?tab=AdminModules&configure=skeleton&token=f4078c9e4e7182aa9f955d29dcba6a57" method="post">

Settings
Price "text" for products that dont cost anything

                   <input type="text" name="our_message" value="This product is free"/>

Terms such as "free", "no price", "open source", or "N/A"

Reason why you are selling some/all of your products free

                   <textarea rows="6" cols="80" name="our_textarea" >To promote open source stuff, some of our content is free</textarea>

Justify the reason this product is free, or leave blank if you are including the reason somewhere else

Alternative payment module


None
Default
Freemium


Choose the alternative payment option (if any) you would like to enable to allow users to provide a form of none money based payment (possable reason why a product is "free")

Skip payment module?

                   <input type="checkbox" name="our_checkbox" value="true" checked="checked" />

Check if you would like to go straight to downloading product, or uncheck if you require an alternative type of payment module

Type of product applicable to

                   <input type="radio" name="our_radio" value="none" checked="checked" >Downloadable products only
                   <input type="radio" name="our_radio" value="more" >Tangible products only
                   <input type="radio" name="our_radio" value="less" >Both downloadable products and tangable products

If there is only a certain type of product you want this module to work with then specify here (Note: Tangable products may still be charged for delivery and shipping)



A quick summary of this HTML form code is that it has the following form elements: 1 text input, 1 textarea, a selection box with three options, 1 checkbox, and 1 radio button group with 3 options.

The text input is where the admin enters the text to display instead of price for a free product.
The textarea is where the admin puts a message that states why the/these products are free.
The option selection allows the admin to choose a non money exchange method of purchasing a product be required.
The checkbox the admin uses to enable or disable payment, meaning they can skip the payment module being required.
and the radio buttons let the admin choose which type of product (tangible or down-loadable) this module applies to.

So in a short amount of time I have gotten very far thanks to an article I found on creating modules, and understand how most things work, however I was wondering if you would know where the "hooks" have to go to alter the contents of a specific element and how I can make this module be executed after core module execution?

At the moment I have this module on the front page left column (from the view of MVC)

Link to comment
Share on other sites

I have tried copying templates of modules that appear on the product.php page, but I can only understand how to add new hooks, an it is an already declared hook I want to modify. Does any one know how to find out the delared smarty hooks for each page and how to modify them? this is the only poblem I'm having with making this module.

Link to comment
Share on other sites

Actually thats just gave me an idea how to get this done a lot easier.

Since all I want to do is a cosmetic change (for showing the price is "free"), and won't actually effect the data I can get my module to simply change the value in the last JavaScript executed to change the value.

I looked up the source and this is the tags the price and tax warning are included in:

£2.46
tax incl.



So with javascript using jquery I could use a script like this (tested and works):


/* declare variables */
var current_price;
var non_price;
var currency_cutter;

// declare "free message"
non_price = "THIS is FREE";

// remove any charachter that isnt the last 4 charachters (x.xx)
current_price = $("#our_price_display").html();
currency_cutter = -4;
current_price = current_price.substr(currency_cutter, current_price.length);

// if value is equal to 0 "no cost" then non_price "free message" displayed
if(current_price == 0)
{
 $("#our_price_display").html(non_price);
 // cut off "tax incl." by not re-including it 
 $(".our_price_display").html($("#our_price_display"));
}



I'm not sure where to add this code so it modifies the price just before the user sees it, but I'm sure if I can find one skimming through or you know of it, I can make it happen.

The only thing that might cause a problem is how my module adds this to a script when installed, and removes it when uninstalled. I read prestashop re-corrects modifications to core files when a module is uninstalled, but does this apply to javascript core files? If not what would I do to initiate a function to call when the module is installed or uninstalled?

As for the payment module, I might just make direct links on product pages, or try the "fake payment" system.

Link to comment
Share on other sites

For the tab containing the links to downloadable fiels, you can use the attachements feature
For each product, you define attachments that are the fles downloadable for free.

Customers will be able to download them, without need to register

Link to comment
Share on other sites

  • 3 months later...
Actually thats just gave me an idea how to get this done a lot easier.

Since all I want to do is a cosmetic change (for showing the price is "free"), and won't actually effect the data I can get my module to simply change the value in the last JavaScript executed to change the value.

I looked up the source and this is the tags the price and tax warning are included in:
£2.46
tax incl.



So with javascript using jquery I could use a script like this (tested and works):


/* declare variables */
var current_price;
var non_price;
var currency_cutter;

// declare "free message"
non_price = "THIS is FREE";

// remove any charachter that isnt the last 4 charachters (x.xx)
current_price = $("#our_price_display").html();
currency_cutter = -4;
current_price = current_price.substr(currency_cutter, current_price.length);

// if value is equal to 0 "no cost" then non_price "free message" displayed
if(current_price == 0)
{
 $("#our_price_display").html(non_price);
 // cut off "tax incl." by not re-including it 
 $(".our_price_display").html($("#our_price_display"));
}



I'm not sure where to add this code so it modifies the price just before the user sees it, but I'm sure if I can find one skimming through or you know of it, I can make it happen.

The only thing that might cause a problem is how my module adds this to a script when installed, and removes it when uninstalled. I read prestashop re-corrects modifications to core files when a module is uninstalled, but does this apply to javascript core files? If not what would I do to initiate a function to call when the module is installed or uninstalled?

As for the payment module, I might just make direct links on product pages, or try the "fake payment" system.



Edit directly in your product.tpl file . Search the section of the price (our price display)

{if $product->price eq "0.000000"}
Free

{else}
{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}
{/if}


This is an example.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...