Jump to content

how to change the price in the moment of "add to cart click"


jemmeli

Recommended Posts

Hi Jemmeli,

How do you want to use this exactly? Is it just a temporary change of price (i.e. the product price will not change when entering the product page again) or should it change permanently?

Also, should the user see that you change the price on the product page first, or only see the result of it in the shopping cart?

 

Please elaborate a little more what exactly is the reason why you need this.

pascal

 

N.B. What version of Prestashop do you use??

  • Like 1
Link to comment
Share on other sites

thanks PascalVG ,

 

I am using prestashop 1.5 , I am developping a module similar to infobia module http://demo.infobia....hirt-femme.html , i have a button to save the customization , my question is when I made the customization does the informations of the custumazation get stored in new database table or in the prestashop's predifined table or it is stored in the cookies or there is another way to show the new price and information in the card as well as in the checkout page ?

Edited by jemmeli (see edit history)
Link to comment
Share on other sites

my question is when I made the customization does the informations of the custumazation get stored in new database table or in the prestashop's predifined table or it is stored in the cookies or there is another way to show the new price and information in the card as well as in the checkout page ?

 

As you develop the module, it is of course whatever you want it to do, and program it accordingly... So first you need to make clear for yourself how it should work exactly,

- what is the initial price the customer sees,

- what does he/she have to do to get the other price,

- is the price only meant for this customer (and only this time, or permanently, when re-ordering as well) or

- should it change for more/all customers (in the same group/all),

- when exactly should you change the price (i.e. when to first show the change to the customer).

- Should the card hold this new price, or only at the end, given through a 'discount',

- what happens if the customer adds the same product again: should he go through the whole process to get this new price or just add an extra amount to the already available product/price combination,

- is there any tax involved, and if so, does the tax change when giving this new price or does it keep the same,

- is there a max number of days the customer gets this new price before it jumps back to the original price?

- etc etc.

 

From there you can adapt the solution as needed. Change the value in the database makes it available for everyone. If not, you have to store this value somewhere (cookie, separate special purpose table you add yourself), write the code for this accordingly.

 

Not a quick answer, as this might need some heavy coding (if not directly changed in the database), as you need to modify quite some files for this special customer's needs and your 'rules' you want to impose.

 

So check first what exactly is needed and start designing. If you have questions along the way, come back and ask in the forum specific questions that give troubles.

 

pascal

  • Like 1
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...