Created
March 12, 2020 12:47
-
-
Save yasinkuyu/b33eaba3cb7130b4f2cc688dcce7bba9 to your computer and use it in GitHub Desktop.
Opencart Journal2 ProductSize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<modification> | |
<name>Journal2ProductSize (insya)</name> | |
<version>1</version> | |
<author>yasinkuyu</author> | |
<code>Journal2ProductSize</code> | |
<file path="catalog/view/theme/journal2/template/common/header.twig"> | |
<operation> | |
<search position="before"><![CDATA[</head>]]></search> | |
<add><![CDATA[ | |
<style type="text/css"> | |
/* yasin */ | |
.cat_op_size { padding: 0; } | |
.cat_op_size li { | |
padding: 0; | |
border: 1px solid #ccc; | |
display: inline-grid; | |
padding: 5px; | |
border-radius: 50%; | |
margin:0 !important; | |
} | |
.cat_op_size_mini { padding: 0; } | |
.cat_op_size_mini li { | |
padding: 0; | |
border: 1px solid #ccc; | |
display: inline-grid; | |
padding: 5px; | |
border-radius: 50%; | |
margin:0 !important; | |
} | |
</style> | |
]]></add> | |
</operation> | |
</file> | |
<file path="catalog/controller/module/journal2_carousel.php"> | |
<operation> | |
<search position="replace"><![CDATA[$product_data = array(]]></search> | |
<add><![CDATA[ | |
$product_data = array( | |
'options' => $this->model_catalog_product->getProductOptions($product['product_id']), | |
]]></add> | |
</operation> | |
</file> | |
<file path="catalog/view/theme/journal2/template/journal2/module/carousel_product.twig"> | |
<operation> | |
<search position="replace"><![CDATA[<div class="caption">]]></search> | |
<add><![CDATA[ | |
{% if product.options %} | |
<ul class="cat_op_size_mini"> | |
{% for option in product.options %} | |
{% if option.type == 'radio' %} | |
{% for option_value in option.product_option_value %} | |
<li>{{ option_value.name }}</li> | |
{% endfor %} | |
{% endif %} | |
{% endfor %} | |
</ul> | |
{% endif %} | |
<div class="caption"> | |
]]></add> | |
</operation> | |
</file> | |
<file path="catalog/controller/product/category.php"> | |
<operation> | |
<search position="replace"><![CDATA[$data['products'][] = array(]]></search> | |
<add><![CDATA[ | |
$data['products'][] = array( | |
'options' => $this->model_catalog_product->getProductOptions($result['product_id']), | |
]]></add> | |
</operation> | |
</file> | |
<file path="catalog/view/theme/*/template/product/category.twig"> | |
<operation> | |
<search position="replace"><![CDATA[{% for label, name in product.labels %}]]></search> | |
<add><![CDATA[ | |
{% if product.options %} | |
<ul class="cat_op_size"> | |
{% for option in product.options %} | |
{% if option.type == 'radio' %} | |
{% for option_value in option.product_option_value %} | |
<li>{{ option_value.name }}</li> | |
{% endfor %} | |
{% endif %} | |
{% endfor %} | |
</ul> | |
{% endif %} | |
{% for label, name in product.labels %} | |
]]></add> | |
</operation> | |
</file> | |
</modification> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment