How can i Override file engine/Shopware/Core/sArticles.php in Shopware?

I want to override  sSaveComment  function in Shopware engine/Shopware/Core/sArticles.php

since i want to replace at the place of (1 to 10 ) to (1 star , 2stars ,3stars) etc .

Check the file /themes/Frontend/Bare/frontend/detail/comment/form.tpl

You’ll find the following:

{* Review Rating *}
{block name='frontend_detail_comment_input_rating'}
    
        
            {s name="Rate10"}{/s}
            {s name="Rate9"}{/s}
            {s name="Rate8"}{/s}
            {s name="Rate7"}{/s}
            {s name="Rate6"}{/s}
            {s name="Rate5"}{/s}
            {s name="Rate4"}{/s}
            {s name="Rate3"}{/s}
            {s name="Rate2"}{/s}
            {s name="Rate1"}{/s}
        
    
{/block}

 

If you want to change your rating system from 1 - 10 to 1 - 5 you’ll have to do something like the following:
Note: Please don’t change the file in the Bare Template, create an own Template / Theme and edit this block in your own Theme. Check documentation.

{extends file="parent:frontend/detail/comment/form.tpl"}

{namespace name="frontend/detail/comment"}

{* Review Rating *}
{block name='frontend_detail_comment_input_rating'}
    
        
            {s name="Rate5"}{/s}
            {s name="Rate4"}{/s}
            {s name="Rate3"}{/s}
            {s name="Rate2"}{/s}
            {s name="Rate1"}{/s}
        
    
{/block}

If you just want to change the text which is shown in the dropdown, you can just edit the snippets via your shopware backen (Snippets: Rate1 - Rate10) and don’t need to change anything in the template / theme itself.

Super logic . 

Thanks so much 

You’re welcome :slight_smile:

Thanks for your helpful explanation