Post by Loady » Wed May 12, 2021 3:38 am

For the whole i am happy with the checkout page, however i provide one product which is a service that people send in their equipment for me work on, when this product is in the cart i would like there to be a message on the checkout telling the customer my address to send the console to, it is only one product i will ever do this for so i dont want my address to be on the checkout page for every other item i sell...is it possible ?

Active Member

Posts

Joined
Sun Oct 07, 2018 10:47 pm

Post by by mona » Wed May 12, 2021 5:10 am

Yes it is possible and reasonably simple for a beginner.
Screen Shot 2021-05-11 at 22.16.43.png

Screen Shot 2021-05-11 at 22.16.43.png (64.93 KiB) Viewed 375 times

in your checkout/confirm.twig
BEFORE

Code: Select all

{% endfor %}
{% for voucher in vouchers %}
ADD

Code: Select all

{% if product.product_id == 30 %}
<tr><span>
Our Return Address can be found on the contact page:
<p><h3>MY COMPANY</h3></p>
<p>line one</p>
<p>line two</p>
<p>line three</p>
<br/>
</span></tr>
{% endif %}
 
where 30 is your product_id that you want it to appear on.

Might be nicer to have it as a pop up or a tab on that right that appears only when this product is purchased .. just as an idea.
Last edited by by mona on Fri May 14, 2021 6:19 am, edited 1 time in total.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by Loady » Fri May 14, 2021 5:37 am

Thanks, i tried it but it doesnt appear on checkout page...

Code: Select all

  {% for product in products %}
    <tr>
      <td class="text-left"><a href="{{ product.href }}">{{ product.name }}</a> {% for option in product.option %} <br />
        &nbsp;<small> - {{ option.name }}: {{ option.value }}</small> {% endfor %}
        {% if product.recurring %} <br />
        <span class="label label-info">{{ text_recurring_item }}</span> <small>{{ product.recurring }}</small> {% endif %}</td>
      <td class="text-left">{{ product.model }}</td>
      <td class="text-right">{{ product.quantity }}</td>
      <td class="text-right">{{ product.price }}</td>
      <td class="text-right">{{ product.total }}</td>
    </tr>
    {% endfor %}
    {% if product.product_id == 88 %}
<tr><span>
For send in service please send console only to:
<p><h3>KeXXXXXlden</h3></p>
<p>22 SXXXXXXPark</p>
<p>SWXXXXXXTB</p>
<p>Wandsworth</p>
<p>London</p>
<br/>
</span></tr>
{% endif %}
 
    {% for voucher in vouchers %}
    <tr>
      <td class="text-left">{{ voucher.description }}</td>
      <td class="text-left"></td>
      <td class="text-right">1</td>
      <td class="text-right">{{ voucher.amount }}</td>
      <td class="text-right">{{ voucher.amount }}</td>
    </tr>
    {% endfor %}
      </tbody>
https://gyazo.com/9c440e1152c09f6f331210aa7813bfff

Active Member

Posts

Joined
Sun Oct 07, 2018 10:47 pm

Post by Loady » Fri May 14, 2021 5:42 am

Maybe because i didnt go through by entering card details ?

Active Member

Posts

Joined
Sun Oct 07, 2018 10:47 pm

Post by by mona » Fri May 14, 2021 6:23 am

no that is not it - my mistake - thanks for posting the code - one line up

Code: Select all

 {% for product in products %}
    <tr>
      <td class="text-left"><a href="{{ product.href }}">{{ product.name }}</a> {% for option in product.option %} <br />
        &nbsp;<small> - {{ option.name }}: {{ option.value }}</small> {% endfor %}
        {% if product.recurring %} <br />
        <span class="label label-info">{{ text_recurring_item }}</span> <small>{{ product.recurring }}</small> {% endif %}</td>
      <td class="text-left">{{ product.model }}</td>
      <td class="text-right">{{ product.quantity }}</td>
      <td class="text-right">{{ product.price }}</td>
      <td class="text-right">{{ product.total }}</td>
    </tr>
 {% if product.product_id == 88 %}
<tr><span>
For send in service please send console only to:
<p><h3>KeXXXXXlden</h3></p>
<p>22 SXXXXXXPark</p>
<p>SWXXXXXXTB</p>
<p>Wandsworth</p>
<p>London</p>
<br/>
</span></tr>
{% endif %}
     {% endfor %}
    {% for voucher in vouchers %}
    <tr>
      <td class="text-left">{{ voucher.description }}</td>
      <td class="text-left"></td>
      <td class="text-right">1</td>
      <td class="text-right">{{ voucher.amount }}</td>
      <td class="text-right">{{ voucher.amount }}</td>
    </tr>
    {% endfor %}
      </tbody>


DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by straightlight » Fri May 14, 2021 7:34 am

Code: Select all

<td class="text-right">{{ voucher.amount }}</td>
      <td class="text-right">{{ voucher.amount }}</td>
      
from the above ...

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by by mona » Fri May 14, 2021 8:17 am

Yes that is what is in the default file. Loady has copied the file correctly.
I made a typo when I originally posted, it was my error.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by straightlight » Fri May 14, 2021 9:49 am

by mona wrote:
Fri May 14, 2021 8:17 am
Yes that is what is in the default file. Loady has copied the file correctly.
I made a typo when I originally posted, it was my error.
For some reason, the issue is still on the maintenance and master branch but has been reported on the forum before as duplicate entry ... hard to say if this is really about a duplicate or if it's really meant to be there, still, at this time ...

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Loady » Sun May 16, 2021 4:50 pm

Taht worked many thanks.... just a bit of a issue with font size, is there an editer that can adjust this for me, ?

Active Member

Posts

Joined
Sun Oct 07, 2018 10:47 pm

Post by by mona » Sun May 16, 2021 5:24 pm

Glad it works ..

Code: Select all

<span style="font-size:12px">
</span>
or find a class that suits

Code: Select all

<span class="">
</span>
or per line

Code: Select all

<p class=""></p>
or remove

Code: Select all

<p><h3>KeXXXXXlden</h3></p>
so it becomes

Code: Select all

<p>KeXXXXXlden</p>

with the span and p relating to this bit

Code: Select all

<span>

For send in service please send console only to:
<p><h3>KeXXXXXlden</h3></p>
<p>22 SXXXXXXPark</p>
<p>SWXXXXXXTB</p>
<p>Wandsworth</p>
<p>London</p>
<br/>
</span>

READ THIS
https://www.w3schools.com/css/

If you need a solution, you need to ask a specific question - just a bit of an issue with font size is polite [ which I like ], but it is vague, so the answer is difficult to provide.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: No registered users and 92 guests