Adding Flex Item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lesliekirk
    Super Moderator











    • Aug 2008
    • 9295

    #1

    Adding Flex Item

    Is it possible to add a Flex Item from one Theme to another? I want to use the search-listing Product List that's in the latest version(s) of Shadows in Colossus. Can I copy and paste the Item Settings from Shadows into Colossus?

    LOL, I guess I can try it. What's the worst that could happen?

    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: X | Facebook | Pinterest
  • lesliekirk
    Super Moderator











    • Aug 2008
    • 9295

    #2
    For the archives:

    Go to SRCH in a branch with the latest version of Shadows.

    Click the Flex Items tab, then click on search-listing

    Copy the Item Code search-listing Flex Component Product List and the code in the Settings field. (I'm going to include the current code, realizing it will be out of date in the future):
    Code:
    {
        "_flex": {
            "flex_version": 26.02,
            "settings_version": "26.02.00"
        },
        "advanced": {
            "empty_results_message": {
                "source": "markdown",
                "value": "There were no products that matched your search.",
                "visible": 1
            },
            "initial_display": {
                "initial_height": {
                    "value": "auto"
                },
                "initial_height_amount": {
                    "visible": 0
                }
            },
            "param_prefix": "",
            "search": {
                "index": {
                    "visible": 0
                },
                "origin": {
                    "value": "Runtime API"
                },
                "type": {
                    "value": "system"
                }
            },
            "show_empty_results": {
                "value": 1
            },
            "spacing": {
                "bottom": "",
                "top": ""
            },
            "submit_method": ""
        },
        "card": {
            "add_to_wishlist": {
                "add_wishlist": {
                    "button": {
                        "value": "Create Wishlist"
                    },
                    "heading": {
                        "value": "Create A Wishlist"
                    }
                },
                "dialog": {
                    "heading_typography_theme": {
                        "code": "title-4",
                        "theme_mode": 1
                    },
                    "primary_button_theme": {
                        "code": "primary",
                        "size": "m",
                        "theme_mode": 1
                    },
                    "secondary_button_theme": {
                        "code": "secondary",
                        "size": "m",
                        "theme_mode": 1
                    },
                    "tertiary_button_theme": {
                        "code": "display-link",
                        "size": "m",
                        "theme_mode": 1
                    },
                    "wishlist_typography_theme": {
                        "code": "subheading-xs",
                        "theme_mode": 1
                    }
                },
                "empty_wishlists": {
                    "button": {
                        "value": "Add Wishlist"
                    },
                    "heading": {
                        "value": "Start Your Wishlist"
                    },
                    "message": {
                        "value": "You don't have any wishlists yet."
                    }
                },
                "icon": {
                    "color": {
                        "value": "#FFFFFF"
                    },
                    "set": {
                        "value": "heart"
                    }
                },
                "login": {
                    "button": {
                        "value": "Log In",
                        "visible": 1
                    },
                    "forgot_password_text": {
                        "value": "Forgot Password?",
                        "visible": 1
                    },
                    "forgot_password_url": {
                        "type": "page",
                        "value": "FPWD",
                        "visible": 1
                    },
                    "heading": {
                        "value": "Sign In to Save to Wishlist",
                        "visible": 1
                    },
                    "login_register_text": {
                        "visible": 0
                    },
                    "login_register_url": {
                        "visible": 0
                    },
                    "method": {
                        "value": "form"
                    },
                    "register_text": {
                        "value": "Register",
                        "visible": 1
                    },
                    "register_url": {
                        "type": "page",
                        "value": "LOGN",
                        "visible": 1
                    }
                },
                "select_product_options": {
                    "button": {
                        "value": "Add To Wishlist"
                    },
                    "heading": {
                        "value": "Select Product Options"
                    }
                },
                "select_wishlist": {
                    "button": {
                        "value": "Add Wishlist"
                    },
                    "heading": {
                        "value": "Select A Wishlist"
                    }
                },
                "settings": {
                    "enabled": 1
                }
            },
            "details": {
                "children": [
                    {
                        "ADPR_url": {
                            "visible": 0
                        },
                        "ATWL_url": {
                            "visible": 0
                        },
                        "button": {
                            "text": {
                                "textsettings": {
                                    "fields": {
                                        "normal": {
                                            "button_size": {
                                                "visible": 1
                                            },
                                            "button_style": {
                                                "visible": 1
                                            },
                                            "button_theme": {
                                                "theme_mode": ""
                                            },
                                            "button_width": {
                                                "visible": 0
                                            }
                                        }
                                    }
                                }
                            },
                            "visible": 0
                        },
                        "customfield": {
                            "visible": 0
                        },
                        "fragment": {
                            "visible": 0
                        },
                        "name": {
                            "value": "Name"
                        },
                        "prefix": {
                            "visible": 1
                        },
                        "price": {
                            "additional": "",
                            "displayed": "",
                            "visible": 0
                        },
                        "price_text_styles": {
                            "additional": {
                                "font": {
                                    "visible": 1
                                },
                                "font_color": {
                                    "visible": 1
                                },
                                "font_size": {
                                    "visible": 1
                                },
                                "style": {
                                    "visible": 1
                                },
                                "text_transform": {
                                    "visible": 1
                                },
                                "typography_theme": {
                                    "theme_mode": ""
                                }
                            },
                            "displayed": {
                                "font": {
                                    "visible": 1
                                },
                                "font_color": {
                                    "visible": 1
                                },
                                "font_size": {
                                    "visible": 1
                                },
                                "style": {
                                    "visible": 1
                                },
                                "text_transform": {
                                    "visible": 1
                                },
                                "typography_theme": {
                                    "theme_mode": ""
                                }
                            },
                            "text_align": "",
                            "visible": 0
                        },
                        "rating_settings": {
                            "active_color": "",
                            "align": "",
                            "count_custom_field": "",
                            "icon": "",
                            "inactive_color": "",
                            "max_rating": "",
                            "rating_custom_field": "",
                            "visible": 0
                        },
                        "suffix": {
                            "visible": 1
                        },
                        "text_styles": {
                            "font": {
                                "visible": 0
                            },
                            "font_color": {
                                "visible": 0
                            },
                            "font_size": {
                                "visible": 0
                            },
                            "settings": {
                                "enabled": 1
                            },
                            "style": {
                                "visible": 0
                            },
                            "text_align": "",
                            "text_transform": {
                                "visible": 0
                            },
                            "typography_theme": {
                                "code": "paragraph-s",
                                "theme_mode": 1
                            },
                            "visible": 1
                        },
                        "type": {
                            "value": "name"
                        }
                    },
                    {
                        "ADPR_url": {
                            "visible": 0
                        },
                        "ATWL_url": {
                            "visible": 0
                        },
                        "button": {
                            "text": {
                                "textsettings": {
                                    "fields": {
                                        "normal": {
                                            "button_size": {
                                                "visible": 1
                                            },
                                            "button_style": {
                                                "visible": 1
                                            },
                                            "button_theme": {
                                                "theme_mode": ""
                                            },
                                            "button_width": {
                                                "visible": 0
                                            }
                                        }
                                    }
                                }
                            },
                            "visible": 0
                        },
                        "customfield": {
                            "visible": 0
                        },
                        "fragment": {
                            "visible": 0
                        },
                        "name": {
                            "value": "Price"
                        },
                        "prefix": {
                            "visible": 0
                        },
                        "price": {
                            "additional": {
                                "value": "base"
                            },
                            "displayed": {
                                "value": "sale"
                            },
                            "visible": 1
                        },
                        "price_text_styles": {
                            "additional": {
                                "font": {
                                    "visible": 0
                                },
                                "font_color": {
                                    "visible": 0
                                },
                                "font_size": {
                                    "visible": 0
                                },
                                "style": {
                                    "visible": 0
                                },
                                "text_align": {
                                    "value": "left"
                                },
                                "text_transform": {
                                    "visible": 0
                                },
                                "typography_theme": {
                                    "code": "paragraph-s",
                                    "customizations": {
                                        "styles": {
                                            "color": {
                                                "value": "var(--mmx-product-additional-price-color)"
                                            },
                                            "overwrite_color": 1
                                        }
                                    },
                                    "theme_mode": 1
                                }
                            },
                            "displayed": {
                                "font": {
                                    "visible": 0
                                },
                                "font_color": {
                                    "visible": 0
                                },
                                "font_size": {
                                    "visible": 0
                                },
                                "style": {
                                    "visible": 0
                                },
                                "text_align": {
                                    "value": "left"
                                },
                                "text_transform": {
                                    "visible": 0
                                },
                                "typography_theme": {
                                    "code": "paragraph-s",
                                    "customizations": {
                                        "styles": {
                                            "color": {
                                                "value": "var(--mmx-product-price-color)"
                                            },
                                            "overwrite_color": 1
                                        }
                                    },
                                    "theme_mode": 1
                                }
                            },
                            "text_align": "",
                            "visible": 1
                        },
                        "rating_settings": {
                            "active_color": "",
                            "align": "",
                            "count_custom_field": "",
                            "icon": "",
                            "inactive_color": "",
                            "max_rating": "",
                            "rating_custom_field": "",
                            "visible": 0
                        },
                        "suffix": {
                            "visible": 0
                        },
                        "text_styles": {
                            "visible": 0
                        },
                        "type": {
                            "value": "price"
                        }
                    },
                    {
                        "ADPR_url": {
                            "visible": 0
                        },
                        "ATWL_url": {
                            "visible": 0
                        },
                        "button": {
                            "text": {
                                "textsettings": {
                                    "fields": {
                                        "normal": {
                                            "button_size": {
                                                "visible": 1
                                            },
                                            "button_style": {
                                                "visible": 1
                                            },
                                            "button_theme": {
                                                "theme_mode": ""
                                            },
                                            "button_width": {
                                                "visible": 0
                                            }
                                        }
                                    }
                                }
                            },
                            "visible": 0
                        },
                        "customfield": {
                            "visible": 0
                        },
                        "fragment": {
                            "value": "product_list_additional_data",
                            "visible": 1
                        },
                        "name": {
                            "value": "Additional Data Fragment"
                        },
                        "prefix": {
                            "visible": 0
                        },
                        "price": {
                            "additional": "",
                            "displayed": "",
                            "visible": 0
                        },
                        "price_text_styles": {
                            "additional": {
                                "font": {
                                    "visible": 1
                                },
                                "font_color": {
                                    "visible": 1
                                },
                                "font_size": {
                                    "visible": 1
                                },
                                "style": {
                                    "visible": 1
                                },
                                "text_transform": {
                                    "visible": 1
                                },
                                "typography_theme": {
                                    "theme_mode": ""
                                }
                            },
                            "displayed": {
                                "font": {
                                    "visible": 1
                                },
                                "font_color": {
                                    "visible": 1
                                },
                                "font_size": {
                                    "visible": 1
                                },
                                "style": {
                                    "visible": 1
                                },
                                "text_transform": {
                                    "visible": 1
                                },
                                "typography_theme": {
                                    "theme_mode": ""
                                }
                            },
                            "text_align": "",
                            "visible": 0
                        },
                        "rating_settings": {
                            "active_color": "",
                            "align": "",
                            "count_custom_field": "",
                            "icon": "",
                            "inactive_color": "",
                            "max_rating": "",
                            "rating_custom_field": "",
                            "visible": 0
                        },
                        "suffix": {
                            "visible": 0
                        },
                        "text_styles": {
                            "font": {
                                "visible": 0
                            },
                            "font_color": {
                                "visible": 0
                            },
                            "font_size": {
                                "visible": 0
                            },
                            "settings": {
                                "enabled": 1
                            },
                            "style": {
                                "visible": 0
                            },
                            "text_align": "",
                            "text_transform": {
                                "visible": 0
                            },
                            "typography_theme": {
                                "code": "paragraph-s",
                                "theme_mode": 1
                            },
                            "visible": 1
                        },
                        "type": {
                            "value": "fragment"
                        }
                    }
                ]
            },
            "image": {
                "dimensions": {
                    "value": "290x290"
                },
                "fit": {
                    "value": "contain"
                },
                "hover_image": {
                    "settings": {
                        "enabled": 0
                    }
                },
                "settings": {
                    "enabled": 1
                },
                "swatches": {
                    "settings": {
                        "enabled": 0
                    }
                },
                "type": {
                    "value": "main"
                }
            }
        },
        "heading": {
            "heading_align": {
                "value": "left"
            },
            "heading_text": {
                "textsettings": {
                    "fields": {
                        "normal": {
                            "font": {
                                "visible": 0
                            },
                            "font_color": {
                                "visible": 0
                            },
                            "font_size": {
                                "visible": 0
                            },
                            "heading_style": {
                                "visible": 0
                            },
                            "heading_tag": {
                                "visible": 0
                            },
                            "typography_theme": {
                                "code": "title-1",
                                "theme_mode": 1
                            }
                        }
                    }
                },
                "value": "You searched for \"%search%\""
            },
            "settings": {
                "enabled": 1
            }
        },
        "list": {
            "categories": {
                "arrow_style": {
                    "value": "button"
                },
                "image_fit": {
                    "value": "cover"
                },
                "image_size": {
                    "value": 200
                },
                "image_type": {
                    "value": "cattree"
                },
                "nav_button_size": {
                    "visible": 0
                },
                "nav_position": {
                    "value": "none"
                },
                "per_move": {
                    "value": "auto"
                },
                "per_page": {
                    "value": "2,3,6"
                },
                "settings": {
                    "enabled": 1
                }
            },
            "columns": {
                "desktop": {
                    "value": 4
                },
                "mobile": {
                    "value": 2
                },
                "tablet": {
                    "value": 3
                }
            },
            "details": {
                "settings": {
                    "enabled": 1
                },
                "show_current_page": {
                    "value": 0
                },
                "show_search_term": {
                    "value": 0
                },
                "show_total_products": {
                    "value": 1
                }
            },
            "facets": {
                "display_show_more_links": {
                    "value": 1
                },
                "expanded_facet_count": {
                    "visible": 0
                },
                "expanded_facets": {
                    "value": "expand_all"
                },
                "facet_styles": {
                    "facet_style": {
                        "visible": 0
                    },
                    "font": {
                        "visible": 0
                    },
                    "font_color": {
                        "visible": 0
                    },
                    "font_size": {
                        "visible": 0
                    },
                    "typography_theme": {
                        "code": "subheading-s",
                        "theme_mode": 1
                    }
                },
                "hide_facets_on_desktop": {
                    "value": 0
                },
                "hide_facets_prefix": {
                    "visible": 0
                },
                "settings": {
                    "enabled": 1
                },
                "show_category_tree": {
                    "value": 1
                },
                "show_facets_prefix": {
                    "visible": 0
                },
                "show_less_text": {
                    "value": "Show Less",
                    "visible": 1
                },
                "show_more_text": {
                    "value": "Show More",
                    "visible": 1
                },
                "show_more_threshold": {
                    "value": 8,
                    "visible": 1
                },
                "show_value_counts": {
                    "value": 1
                },
                "title": {
                    "textsettings": {
                        "fields": {
                            "normal": {
                                "font": {
                                    "visible": 0
                                },
                                "font_color": {
                                    "visible": 0
                                },
                                "font_size": {
                                    "visible": 0
                                },
                                "title_style": {
                                    "visible": 0
                                },
                                "typography_theme": {
                                    "code": "title-4",
                                    "theme_mode": 1
                                }
                            }
                        }
                    },
                    "value": "Filters"
                },
                "width": {
                    "value": 20
                }
            },
            "pagination": {
                "next_previous": {
                    "value": "arrows"
                },
                "next_text": {
                    "visible": 0
                },
                "page_link_count": {
                    "value": 7,
                    "visible": 1
                },
                "page_numbers": {
                    "value": "links"
                },
                "previous_text": {
                    "visible": 0
                },
                "settings": {
                    "enabled": 1
                }
            },
            "per_page": {
                "default": {
                    "value": 24
                },
                "options": {
                    "children": [
                        {
                            "amount": {
                                "value": 12
                            },
                            "label": {
                                "value": "12 Items / Page"
                            }
                        },
                        {
                            "amount": {
                                "value": 24
                            },
                            "label": {
                                "value": "24 Items / Page"
                            }
                        },
                        {
                            "amount": {
                                "value": 48
                            },
                            "label": {
                                "value": "48 Items / Page"
                            }
                        }
                    ]
                },
                "settings": {
                    "enabled": 1
                }
            },
            "products": {
                "category": {
                    "visible": 0
                },
                "category_source": {
                    "visible": 0
                },
                "product": {
                    "visible": 0
                },
                "product_set": {
                    "value": "auto"
                },
                "related_source": {
                    "visible": 0
                },
                "showcase": {
                    "visible": 0
                }
            },
            "sort_by": {
                "default": {
                    "value": "relevance"
                },
                "default_customfield": {
                    "visible": 0
                },
                "options": {
                    "children": [
                        {
                            "code": {
                                "value": "relevance"
                            },
                            "code_customfield": {
                                "visible": 0
                            },
                            "label": {
                                "value": "Relevance"
                            }
                        },
                        {
                            "code": {
                                "value": "bestsellers"
                            },
                            "code_customfield": {
                                "visible": 0
                            },
                            "label": {
                                "value": "Best Selling"
                            }
                        },
                        {
                            "code": {
                                "value": "price_asc"
                            },
                            "code_customfield": {
                                "visible": 0
                            },
                            "label": {
                                "value": "Price (Low to High)"
                            }
                        },
                        {
                            "code": {
                                "value": "price_desc"
                            },
                            "code_customfield": {
                                "visible": 0
                            },
                            "label": {
                                "value": "Price (High to Low)"
                            }
                        },
                        {
                            "code": {
                                "value": "newest"
                            },
                            "code_customfield": {
                                "visible": 0
                            },
                            "label": {
                                "value": "Newest Items"
                            }
                        }
                    ]
                },
                "settings": {
                    "enabled": 1
                }
            }
        }
    }
    Go to the branch needing the seach-listing Flex Item.

    Go to the SRCH template, Flex Items tab and click Add Item

    Enter the Item Code, select the Flex Component and paste the Setting code into the Settings field. Click Update.

    I then went to the Sequence (sequence) and added the flex item there. It can also be added the "usual" way.




    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: X | Facebook | Pinterest

    Comment

    Working...
    X