Skip to content

Commit 3a15d99

Browse files
authored
Merge pull request #1523 from algolia/feature/MAGE-894
MAGE-894: Looking similar admin config added
2 parents 1e989de + 0b2d565 commit 3a15d99

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

etc/adminhtml/system.xml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,53 @@
826826
</comment>
827827
</field>
828828
</group>
829+
<group id="looking_similar" translate="label" type="text" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1">
830+
<label>Looking Similar</label>
831+
<field id="is_looking_similar_enabled_on_pdp" translate="label comment" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
832+
<label>Enable on PDP</label>
833+
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
834+
<comment>
835+
<![CDATA[
836+
Do you want Looking Similar Items to display inside a product detail page after main product info?
837+
]]>
838+
</comment>
839+
</field>
840+
<field id="is_looking_similar_enabled_on_cart_page" translate="label comment" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
841+
<label>Enable on Cart Page</label>
842+
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
843+
<comment>
844+
<![CDATA[
845+
Do you want Looking Similar Items to display inside a cart page after cart item info?
846+
]]>
847+
</comment>
848+
</field>
849+
<field id="is_looking_similar_enabled" translate="label comment" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1">
850+
<label>Enable Looking Similar Widgets</label>
851+
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
852+
</field>
853+
<field id="title" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
854+
<validate>required-entry</validate>
855+
<label>Title</label>
856+
</field>
857+
<field id="num_of_products" translate="label comment" type="text" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1">
858+
<label>Number of products to display</label>
859+
<validate>required-entry validate-digits validate-greater-than-zero</validate>
860+
<comment>
861+
<![CDATA[
862+
How many Looking Similar Products do you want to display? Default value is 6.
863+
]]>
864+
</comment>
865+
</field>
866+
<field id="is_addtocart_enabled" translate="label comment" type="select" sortOrder="8" showInDefault="1" showInWebsite="1" showInStore="1">
867+
<label>Enable Add To Cart Button</label>
868+
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
869+
<comment>
870+
<![CDATA[
871+
Do you want to display an "Add To Cart" button in Looking Similar Items?
872+
]]>
873+
</comment>
874+
</field>
875+
</group>
829876
</group>
830877
</section>
831878
<section id="algoliasearch_images" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">

etc/config.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@
7676
<title>Trending items</title>
7777
<num_of_trending_items>6</num_of_trending_items>
7878
</trends_item>
79+
<looking_similar>
80+
<title>Looking Similar</title>
81+
<num_of_products>6</num_of_products>
82+
</looking_similar>
7983
</recommend>
8084
</algoliasearch_recommend>
8185
<algoliasearch_advanced>

0 commit comments

Comments
 (0)