Forums

Covering OroCommerce topics, B2B eCommerce trends, community updates and company announcements.

Forums OroCommerce How can I add SEO Keyworsd to Product programmatically?

This topic contains 3 replies, has 2 voices, and was last updated by mlozynskyy mlozynskyy 7 months, 1 week ago.

  • Creator
    Topic
  • #14592
    mlozynskyy
    mlozynskyy
    Participant

    How can I add SEO Keywords to Product programmatically?

    If I do in that way: I get an error “An exception has been thrown during the rendering of a template (“There must be only one default title”) in vendor/oro/commerce/src/Oro/Bundle/SEOBundle/Resources/views/SEO/keywords_view.html.twig at line 3.”

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #14593

    wgozdzicki
    Participant

    Hello,
    If you want to add keywords for the default localization you have to write something like this:

    You need loop only when you have more than one localization:

    #14594

    wgozdzicki
    Participant

    To be precise, when you have more then one localization still you have to add value for the default one with localization set to null.

    Best regards
    Wiktor

    #14595
    mlozynskyy
    mlozynskyy
    Participant

    @wgozdzicki thank You

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

ssossossosso