Only different price second unit

  • Posts: 14
  • Thank you received: 0
11 years 9 months ago #89201

like putting a second unit product at a lower price (only second unit) if more units will have the same value as the first price.
thanks

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #89379

You can add prices in the product edition page. Add a price for 1 product, a price for two product lower than the first price displayed for 2 items minimum (it's price per product) and a third price equal to the first one for 3 items minimum.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
11 years 9 months ago #90305

Hola Xavier,
Gracias por tu respuesta.
He puesto el primer precio con una cantidad de 9€ por ejemplo y un segundo precio con 6€ y cantidad mínima 2. Finalmente he agregado otro precio igual al primero.

Te adjunto dos imágenes, una con el backend y otra con el resultado en la página.

Lo que me gustaría es que al agregar al carrito la segunda unidad tenga menor precio pero sin que aparezcan los tres precios como en la imagen.

Gracias

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #90585

Hi,

The support is in English, we don't understand Spanish, thanks to translate. :)

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
11 years 9 months ago #91438

Ok, here we go with my English translator of google :laugh:

Hello Xavier,
Thanks for your answer.
I put the first price with an amount of € 9 for example and a second price with 6 € and minimum 2. Finally I added another price equal to the first.

I am attaching two images, one with the backend and another with the result on the page.

What I would like is that when you add to cart the second unit has lower price but without the appearance of the three prices like in the picture.

thanks

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
11 years 9 months ago #91607

You can add CSS code to hide the second and third prices on the product page:
.hikashop_product_price_1, .hikashop_product_price_2{ display: none; }

You can add it in the frontend CSS file of HikaShop via the Display tab of the configuration

Last edit: 11 years 9 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
11 years 8 months ago #92481

If but when you add more than 2 products, 3, 4, 5 ... just tell me only the second price is 2 items. as I do to show me the price of 3 that i would like the first second at a lower price?

example
- 1 unit = 5 €
- 2 units = 4 €
- 3 units = 5 +4 +5 = 14 €
- 4 units = 5 +5 +5 +4 = 19 €
...

Then prices could not show with CSS but first has to show good prices

Thanks,

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
11 years 8 months ago #92708

Mmm. I'm not sure I understand your question.
The prices shown by HikaShop are correct. That's the prices that you enter on your backend.

If you want to have the second product at 4 euros and all others at 5 you will have to configure your prices like that:

1 unit -> 5€
2 units -> 4.5 €
3 units -> 4.66666€
4 units -> 4.75 €
...etc...

The following user(s) said Thank You: gaforex

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
11 years 8 months ago #92747

hello, the idea is good for 2 units, is correct, but when I put the 3 and 4 units, not, still has the value of the second unit

1 = 5EUR
2 = 9EUR (ok)
3 = 13.50 (should be 14EUR)
4 = 18EUR (19EUR should be)

how do I count the values ​​of 3 and 4?

I tried to change the order of prices but nothing.

thanks,

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
11 years 8 months ago #92945

You need to enter the UNIT price not the total price.
Like I explained in my message.
The order of the prices is not relevant.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
11 years 8 months ago #92970

Hello, attached screenshot of prices and results in the front.
comes with two units right = 9 €

the 3 and 4 units in the attached images.

seems that only account for from 2 units for all quantities are chosen.

thanks

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
11 years 8 months ago #93157

Hi,

Ok, now I see that there is an issue with the way the prices are selected for the calculations in your particular case.

Add the code

if(!empty($matches)){
			//force the prices used to be the ones for which the price_min_quantity match with the quantity of the product in the cart
			$tempMatches = array();
			$matchcount = 0;
			foreach($matches as $price){
				if($price->price_min_quantity==$quantity){
					$tempMatches[] = $price;
				}
			}
			if(count($tempMatches)){
				$matches = $tempMatches;
			}
		}
before the code
$prices = $matches;
in the file administrator/components/com_hikashop/classes/currency.php and that should fix the problem.

The following user(s) said Thank You: gaforex

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
11 years 8 months ago #93176

Thank you very much :)

Nice job!

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum