backdrop-contrib / shopify

Integrate and sync your site with a Shopify store.
GNU General Public License v2.0
0 stars 1 forks source link

Rename `theme_entity_property__shopify_product__price` and `...body_html` #28

Closed laryn closed 2 years ago

laryn commented 2 years ago

The functions theme_entity_property__shopify_product__price and theme_entity_property__shopify_product__body_html will need to be renamed by adding _plus_. Those functions are in shopify.module.

argiepiano commented 2 years ago

In addition to renaming the functions, the theme declaration in shopify_theme() needs to be changed as well.

argiepiano commented 2 years ago

PR ready.

argiepiano commented 2 years ago

A new problem appears now that the preprocess function is called - Notice: Undefined index: title_attributes in theme_entity_plus_property__shopify_product__price() (line 1660

argiepiano commented 2 years ago

That second issue is now fixed. Backdrop removed the theme process layer, resulting in array of attributes being passed to theme functions (instead of a string). Thus the need to use backdrop_attributes() to convert the array into html attributes.