Post by Mountune » Mon Jul 02, 2018 6:05 pm

Currently have the following code in my confirm.tpl to add an image at the checkout stages however on ios / android the image is too big. I cant for the life of me remember how to auto resize it.

<div style="text-align:center"><img src="http://www.exampleimagehosting.com/gateway.png" alt="Payment Options" /></div>


Any help appreciated!

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


New member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by IP_CAM » Mon Jul 02, 2018 8:18 pm

Well, did you try it this way ?
Ernie

Code: Select all

<div style="text-align:center"><img src="http://www.exampleimagehosting.com/gateway.png" alt="Payment Options" class="img-responsive" /></div>

Ernie's OpenCart v.1.5.6.5 LIGHT + V-Pro + OpenShop Admin v.1.75 Test Sites
http://www.bigmax.ch - http://www.opencart.li/shop/
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Mountune » Tue Jul 03, 2018 5:54 pm

Thanks IP_CAM,

This worked on mobile devices, however using chrome / internet explorer / firefox from windows the image is no longer centered but to the left?

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


New member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by IP_CAM » Wed Jul 04, 2018 12:23 am

Well, one would have to be able, to take a look, but by use of links like
exampleimagehosting.com, there is just no way, to find out anything. :'(
Ernie

Ernie's OpenCart v.1.5.6.5 LIGHT + V-Pro + OpenShop Admin v.1.75 Test Sites
http://www.bigmax.ch - http://www.opencart.li/shop/
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Mountune » Thu Jul 05, 2018 5:38 pm

Hi Cam,

Thanks for the response... Due to us getting conflicting errors when inserting the image with our stripe gateway (GooglePay refuses to load on andorid chrome with the image displayed yet works on windows chrome... ApplePay shows regardless just seems strange) we have decided we want to image to appear next to STEP 5 : Payment Method - Pay Securely with Credit / Debit Card (IMAGE APPEARS HERE)

Would that be in the catalog/view/theme/default/template/payment_method.tpl ? and if so where abouts would I put it as doing a search I cant find "Pay Securely with Credit / Debit Card"

For this image it doesn't not need to be centered just next to the text would be fine but with the also responsive resizing.


Image attached showing where I mean and I have searched the forum and tried some examples but I think they were for older opencart versions as the folders simply don't exist, (im running v2.3.0.2)

Image

Thanks

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


New member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by Mountune » Tue Jul 10, 2018 8:48 pm

new week bump

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


New member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by IP_CAM » Wed Jul 11, 2018 1:44 am

Bump:
Image

Attachments

unknown_url.jpg

unknown_url.jpg (47.84 KiB) Viewed 121 times


Ernie's OpenCart v.1.5.6.5 LIGHT + V-Pro + OpenShop Admin v.1.75 Test Sites
http://www.bigmax.ch - http://www.opencart.li/shop/
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Mountune » Thu Jul 12, 2018 3:57 pm

Hi Cam,

The website is not published as it is not finished so I cant actually link you to it (loving the image by the way).

As we have had issues with inserting the image into the confirm.tpl and then GooglePay not working on windows chrome (and the creator of the extension being useless and demanding more money to fix a poor extension) we have decided to add the image next to step 5.

I attached a screenshot showing the area I wanted it in but I have done a few methods which have failed to work or the folders are not there (probably older versions of Opencart)

Any help appreciated

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


New member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by Mountune » Thu Jul 12, 2018 5:09 pm

To Update:

I managed to get the image to appear in Checkout Step 5 using the /shop/catalog/view/theme/default/template/checkout/payment_method.tpl using the code:
<div style="text-align:center"><img src="http://example.com/shop/PaymentLogoDesignMaster600.png" alt="Payment Options" class="img-responsive" /></div>

However once again this seems to block GooglePay from working when you go to step 6. Deleting the inserted line from the .tpl and refreshing makes GooglePay work againb ut obviously no image on step 5. Once again this is not a live website so its hard to give you access to view it.


(This is how the .tpl looks with the inserted line)
<?php if ($error_warning) { ?>
<div class="alert alert-warning"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?></div>
<?php } ?>
<?php if ($payment_methods) { ?>
<p><?php echo $text_payment_method; ?></p>
<?php foreach ($payment_methods as $payment_method) { ?>
<div class="radio">
<label>
<?php if ($payment_method['code'] == $code || !$code) { ?>
<?php $code = $payment_method['code']; ?>
<input type="radio" name="payment_method" value="<?php echo $payment_method['code']; ?>" checked="checked" />
<?php } else { ?>
<input type="radio" name="payment_method" value="<?php echo $payment_method['code']; ?>" />
<?php } ?>
<?php echo $payment_method['title']; ?>
<?php if ($payment_method['terms']) { ?>
(<?php echo $payment_method['terms']; ?>)
<?php } ?>
</label>
</div>

<div style="text-align:center"><img src="http://coffeepug.com/shop/PaymentLogoDe ... ter600.png" alt="Payment Options" class="img-responsive" /></div>

<?php } ?>
<?php } ?>
<p><strong><?php echo $text_comments; ?></strong></p>
<p>
<textarea name="comment" rows="8" class="form-control"><?php echo $comment; ?></textarea>
</p>
<?php if ($text_agree) { ?>
<div class="buttons">
<div class="pull-right"><?php echo $text_agree; ?>
<?php if ($agree) { ?>
<input type="checkbox" name="agree" value="1" checked="checked" />
<?php } else { ?>
<input type="checkbox" name="agree" value="1" />
<?php } ?>
&nbsp;
<input type="button" value="<?php echo $button_continue; ?>" id="button-payment-method" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary" />
</div>
</div>
<?php } else { ?>
<div class="buttons">
<div class="pull-right">
<input type="button" value="<?php echo $button_continue; ?>" id="button-payment-method" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary" />
</div>
</div>
<?php } ?>
Cant work out why it prevents GooglePay from appearing when the image is inserted, maybe its the code I have used (im not the best at this)

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


New member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by Mountune » Tue Jul 17, 2018 5:35 pm

anyone?

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


New member

Posts

Joined
Mon Mar 27, 2017 10:03 pm
Who is online

Users browsing this forum: No registered users and 29 guests