Jump to content

Add color name from combinations to product title


marketyellow3

Recommended Posts

Good morning,

I was wondering if it's possible to add the combination color name or value to the product title on the frontoffice. At the moment it only shows the entered title in the backoffice but i was wondering if it's possible to show the selected combination color example black.

I think you need to add a onclick event but i am not good with that and I have been looking for solutions on Google but i couldn't find anything.

Maybe someone who already has this on his Prestashop and likes to share his code how he / she fixed this.

See picture in attachment to see a example.

Thank you in advance for the time and help!

Kind regards,

Marketyellow

Prestashop version: 1.6.1.23

 

change-color.png

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

You can  edit product.js for this. Tap into findCombination, you can use something around where it mentions selectedCombination. Just set h1 to the name attribute it has. I don't recall what's called exactly off the top of my head, but you can console.log(selectedCombination)  and see the name of the property

Link to comment
Share on other sites

  • 4 years later...
On 7/11/2019 at 3:47 PM, NemoPS said:

You can  edit product.js for this. Tap into findCombination, you can use something around where it mentions selectedCombination. Just set h1 to the name attribute it has. I don't recall what's called exactly off the top of my head, but you can console.log(selectedCombination)  and see the name of the property

Hello, I would need this modification - display the value of the combination in the product name to do in Prestashop 8.0. Could you explain it to me in more detail? Well thank you.

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...