Page 2 of 2

Re: Changing Things On Product Page

Posted: Thu Aug 29, 2019 6:15 pm
by xxvirusxx
You can try using this:

Code: Select all

<li>{{ attribute.name }}:  {{ attribute.text }}</li>

Re: Changing Things On Product Page

Posted: Thu Sep 05, 2019 8:03 pm
by onoriotorti
seems like the extra info is showing perfectly on product page and on quickview this is the code:

Code: Select all

{% if attribute_groups %}
               {% for attribute_group in attribute_groups %}
                 {% if attribute_group.name == 'Product Details' %}
                   {% for attribute in attribute_group.attribute %}
                     <span>{{ attribute.name }} {{ attribute.text }}</span>
                   {% endfor %}
                 {% endif %}
               {% endfor %}
             {% endif %}
             {% if attribute_groups %}
               {% for attribute_group in attribute_groups %}
                 {% if attribute_group.name == 'Dettaglio Prodotto' %}
                   {% for attribute in attribute_group.attribute %}
                     <span>{{ attribute.name }} {{ attribute.text }}</span>
                   {% endfor %}
                 {% endif %}
               {% endfor %}
             {% endif %}
I know it didn't change much and I kept the attribute_name instead of the attribute_id.
I have also tried with attribute_id and it works but it displays weirdly on phones and tablets, the original code works fine on all devices for some reason and that's what I'll keep.

now that we solved this problem it takes me to the second part of this forum question the "ex tax" writing
these are the steps I took to try and achive this:

1. inside: admin/system/settings/mystore/option display prices with tax= yes
2. changed $_['text_tax'] inside language files to display "w/o tax"
3. created the following XML file within vqmod to only show the "text_tax" and not actual price

Code: Select all

<!--Tax Text-->

       <file name="catalog/view/theme/journal3/template/product/product.twig">
         <operation>
            <search position="replace"><![CDATA[
              <div class="product-tax">{{ text_tax }} {{ tax }}</div>
            ]]></search>
            <add><![CDATA[<div class="product-tax">{{ text_tax }}</div>
            ]]></add>
          </operation>
       </file>
      <file name="catalog/view/theme/default/template/product/product.twig">
        <operation>
            <search position="replace"><![CDATA[
              <li>{{ text_tax }} {{ product.tax }}</li>
            ]]></search>
            <add><![CDATA[<li>{{ text_tax }}</li>
            ]]></add>
         </operation>
        <operation>
            <search position="replace"><![CDATA[
              {% if product.tax %} <span class="price-tax">{{ text_tax }} {{ product.tax }}</span> {% endif %} </p>
            ]]></search>
            <add><![CDATA[{% if product.tax %} <span class="price-tax">{{ text_tax }}</span> {% endif %} </p>            
            ]]></add>
         </operation>
       </file>
       <!--End Tax Text-->
but that didn't work the price is still shown but I only require the "text_tax" I'm probably doing something wrong and I could use some help.
Thanks everyone.

Re: Changing Things On Product Page

Posted: Tue Sep 10, 2019 8:38 pm
by onoriotorti
does anyone know how to get this to work? My code is probably wrong and I could use some help.

Re: Changing Things On Product Page

Posted: Tue Sep 10, 2019 8:44 pm
by by mona
You might want to post in the commercial section for commercial support .
Alternatively, you could PM either virus or letxobnav and ask them.

Re: Changing Things On Product Page

Posted: Tue Sep 10, 2019 9:42 pm
by xxvirusxx
onoriotorti wrote:
Tue Sep 10, 2019 8:38 pm
does anyone know how to get this to work? My code is probably wrong and I could use some help.
You have cleared Vqmod cache, then refreshed ocmod?

Re: Changing Things On Product Page

Posted: Tue Sep 10, 2019 10:59 pm
by onoriotorti
xxvirusxx wrote:
Tue Sep 10, 2019 9:42 pm
onoriotorti wrote:
Tue Sep 10, 2019 8:38 pm
does anyone know how to get this to work? My code is probably wrong and I could use some help.
You have cleared Vqmod cache, then refreshed ocmod?
yup, cleared all caches and refreshed modifications, and still no change.

Re: Changing Things On Product Page

Posted: Wed Sep 11, 2019 3:25 pm
by xxvirusxx
Change directly in the file.... to something like this to see if display.

Code: Select all

<div class="product-tax">{{ 'Price without taxes' }}</div>
Then clear vqmod cache, refresh ocmod, cleare SASS cache, theme cache.

Re: Changing Things On Product Page

Posted: Wed Sep 11, 2019 4:11 pm
by onoriotorti
xxvirusxx wrote:
Wed Sep 11, 2019 3:25 pm
Change directly in the file.... to something like this to see if display.

Code: Select all

<div class="product-tax">{{ 'Price without taxes' }}</div>
Then clear vqmod cache, refresh ocmod, cleare SASS cache, theme cache.
yes, it shows the phrase "price without taxes" but only for a second then it reverts back to "w/o tax [price]"
also that way only shows it in english and I would need it also in Italian.

Re: Changing Things On Product Page

Posted: Wed Sep 11, 2019 4:14 pm
by xxvirusxx
onoriotorti wrote:
Wed Sep 11, 2019 4:11 pm
but only for a second then it reverts back to "w/o tax [price]"
So you vqmod extension work right?
onoriotorti wrote:
Thu Sep 05, 2019 8:03 pm
but that didn't work the price is still shown
Then whats is the problem?

Re: Changing Things On Product Page

Posted: Wed Sep 11, 2019 4:32 pm
by onoriotorti
Then whats is the problem?
the XML file only works for about a second, as soon as you open the product page you see the phrase "w/o tax" but then it changes back to "w/o tax [price]".
That is the problem it's grabbing the [price] from somewere else, I just don't know were.

Re: Changing Things On Product Page

Posted: Wed Sep 11, 2019 4:59 pm
by xxvirusxx
Store URL?

Re: Changing Things On Product Page

Posted: Wed Sep 11, 2019 5:06 pm
by onoriotorti
xxvirusxx wrote:
Wed Sep 11, 2019 4:59 pm
Store URL?
https://www.cattex.com/test

Re: Changing Things On Product Page

Posted: Wed Sep 11, 2019 5:10 pm
by xxvirusxx
That test is tax text from Product price....and w/o Tax is tax text from Product Options.

LE: Where you have write that test.

Re: Changing Things On Product Page

Posted: Thu Sep 12, 2019 5:33 pm
by onoriotorti
xxvirusxx wrote:
Wed Sep 11, 2019 5:10 pm
That test is tax text from Product price....and w/o Tax is tax text from Product Options.

LE: Where you have write that test.
I'm sorry I don't quite understand, what should I change?

Re: Changing Things On Product Page

Posted: Thu Sep 12, 2019 6:17 pm
by xxvirusxx
What you have changed that show test text.?

Re: Changing Things On Product Page

Posted: Thu Sep 12, 2019 7:52 pm
by onoriotorti
xxvirusxx wrote:
Thu Sep 12, 2019 6:17 pm
What you have changed that show test text.?

Code: Select all

<!--Tax Text-->

       <file name="catalog/view/theme/journal3/template/product/product.twig">
         <operation>
            <search position="replace"><![CDATA[
              <div class="product-tax">{{ text_tax }} {{ tax }}</div>
            ]]></search>
            <add><![CDATA[<div class="product-tax">{{ 'test' }}</div>
            ]]></add>
          </operation>
       </file>
       <file name="catalog/view/theme/default/template/product/product.twig">
        <operation>
            <search position="replace"><![CDATA[
              <li>{{ text_tax }} {{ product.tax }}</li>
            ]]></search>
            <add><![CDATA[<li>{{ 'test' }}</li>
            ]]></add>
         </operation>
        <operation>
            <search position="replace"><![CDATA[
              {% if product.tax %} <span class="price-tax">{{ text_tax }} {{ product.tax }}</span> {% endif %} </p>
            ]]></search>
            <add><![CDATA[{% if product.tax %} <span class="price-tax">{{ 'test' }}</span> {% endif %} </p>            
            ]]></add>
         </operation>
       </file>

       <!--End Tax Text-->
that's what gets the test text there.