Jump to content

Hide attributes dynamically when not available


Recommended Posts

Have been searching and searching how to do this but haven't come across anything. And some of the product settings in PS are quite confusing.

 

Example store, if I sold the following 2 products

  • Shirt / Red colour / Sizes S, M & L
  • Shirt / Blue colour / Sizes M, L, & XL

 

I don't create a combination for Red & XL because that product doesn't exist, yet on the front end of the site a user can still select Red & XL and Prestashop will prompt a message "This combination does not exist for this product. Please select another combination."

 

This isn't really user friendly for a number of reasons, is it sold out? when is it coming in stock? Is the item ever sold in the first place? etc..

 

Is there a way to remove attribute combinations from the front end of the site when they don't exist? So if a user selected Red colour then the XL size would disappear from the size options, leaving only S, M & L choices.

 

 

Any help with code additions or modules would be really appreciated.

Link to comment
Share on other sites

Thanks

 

I've had a look at this thread and it looks like they're just hiding an entire group of attributes rather than dynamically like my example above?

 

{if $group.attributes|@count && $id_attribute_group != 2 && $id_attribute_group != 4} - Would just hide group 2 and group 4 entirely.

Link to comment
Share on other sites

Our Attribute Wizard module lets you hide / disable unavailable combinations, see http://demo.presto-changeo.com/attributewizard/tshirts/1-faded-short-sleeve-tshirts.html (full module at http://www.presto-changeo.com/en/attribute-modules/23-attribute-wizard.html )


 


Keep in mind that the combinations still need to have the proper PS structure, which means each combination MUST contain 1 attribute from each group.


Link to comment
Share on other sites

×
×
  • Create New...