Jump to content

Prices of different groups on product page.


petrutz91

Recommended Posts

Hi everyone,

I have 3 groups, and for each one i have different prices for Product X.

Product X:

  • Group 1 - 10$
  • Group 2 - 8$
  • Group 3 - 7$
  •  

How I can display all 3 prices on product page.

Please help me! I try a lot of different cobinations but without success.

Thank you in advance.

Link to comment
Share on other sites

Hi everyone,

 

I have 3 groups, and for each one i have different prices for Product X.

 

Product X:

  • Group 1 - 10$
  • Group 2 - 8$
  • Group 3 - 7$
  •  

How I can display all 3 prices on product page.

Please help me! I try a lot of different cobinations but without success.

Thank you in advance.

 

You can't without development.

Link to comment
Share on other sites

I did in this way:

 

Assign a customer to a group which I want to display the price. (customer id=4)

 

 

Add the folowing to      / classes / Product.php

 

 

public function getPriceGroup($id_product, $tax = true, $id_product_attribute = null, $decimals = 6, $divisor = null,
        $only_reduc = false, $usereduc = true, $quantity = 1, $force_associated_tax = false, $id_customer = 4, $id_cart = null,
        $id_address = null, &$specific_price_output = null, $with_ecotax = true, $use_group_reduction = true, Context $context = null,
        $use_customer_price = true)
    {
        return Product::getPriceStatic((int)$this->id, $tax, $id_product_attribute, $decimals, $divisor, $only_reduc, $usereduc, $quantity,
$force_associated_tax, $id_customer, $id_cart, $id_address, $specific_price_output, $with_ecotax, $use_group_reduction, $context, $use_customer_price );
    }
 
 
And after add in the file / yourtheme / product.tpl
 
 
Price group:  {convertPrice price=$product->getPriceGroup()}

 

It took some time to learn the structure, but at the end it work. 

 

Hope that it will workfor people who is interested in this feature.

 

Best regards

Edited by petrutz91 (see edit history)
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...