Add a Paypal button on the Shopify cart page - paypal

I want to move the Paypal button from the Shopify Checkout to the Cart page.
The problem I have is that the Paypal button on the Checkout has a token that's only available on the Checkout page. I've also checked the Shopify documentation and there is no mention on how to retrieve this token.

If you have the paypal express enabled in payment gateway. This code should let you display the Paypal button in cart page.
{% if additional_checkout_buttons %}
<div class="additional_checkout_buttons">{{ content_for_additional_checkout_buttons }}</div>
{% endif %}

Login to your Shopify admin
Go to Themes page
Click Template Editor
Click cart.liquid and open it in online code editor
Search for name=”checkout”
Please include the following code.
{% if additional_checkout_buttons %}
Or Checkout using:
{{ content_for_additional_checkout_buttons }}
{% endif %}
Save your changes.

Related

Where is the OpenCart form action url

I am using OpenCart 3.0.2.0. Where is the form action path in OpenCart Twig file?
Here is some of the code:
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-product" class="form-horizontal">
I don't know where this action comes from.
You can go to the admin directory
Path :
admin\controller\catalog\product.php
and find
$data['action']
you can see it for action in view files as well.

How can I get this review plugin working?

I installed a review plugin on my blog. This is the URL to the plugin: https://octobercms.com/plugin/vojtasvoboda-reviews.
The review stars are not showing on my site. Can anybody help me what may be the cause of the review stars not showing?
according to https://octobercms.com/plugin/vojtasvoboda-reviews
Go to the CMS tab in the navigation menu => Components => search for this component => click and drag it to the posts page
or
add this code to the posts page
{% if reviews is not empty %}
<div class="reviews">
<h3>What our customers say about us?</h3>
<div class="stories">
{% component 'reviews' %}
</div>
</div>
{% endif %}

How to embed facebook post along with comments?

Spending a lot of time one figuring out that how to embed facebook posts along with comments, I came up with the idea to embed posts and comment separately using plugins and iterate over comments.
Post:
{% for post in pids %}
<div class="fb-post" data-href="https://www.facebook.com/rio2016/posts/{{ post }}" data-width="750"></div>
<div class="fb-comment-embed" data-href="https://www.facebook.com/zuck/posts/10102735452532991?comment_id=1070233703036185" data-width="750"></div>
<div class="fb-comments" data-href="https://developers.facebook.com/docs/plugins/comments" data-width="750" data-numposts="2"></div>
{% endfor %}
But it differs a lot in design than a post on facebook.
Looks like below:
Screenshot of post
Is there any other way which can facilitate to embed an arbitrary public post along with associated comments?

In October CMS, how can I make an image editable in a Static Page?

I'd like to set up a generic marketing template using the October CMS "Static Pages" plug-in. The intention is to allow my clients to create their own marketing pages. Let's assume that my layout contains HTML similar to this:
<img src="/path/to/image.jpg">
<hr>
<p>Some uneditable copy</p>
{% placeholder copy default title="Main Page Copy" type="html" %}
<h1>Some Awesome Headline</h1>
<p>Sea no omnium deserunt, eum tale movet sensibus te.</p>
{% endplaceholder %}
How could I allow my clients to change the image?
You have a full explenation here
https://octobercms.com/blog/post/building-client-friendly-websites
Add this code to your layout
{variable name="banner" label="Banner" tab="Header" type="mediafinder" mode="image"}{/variable}
and this into your html markup
<img src="{{ banner|media }}" alt="" />
You will see the extra field in your backend
It doesn't seem to be currently supported: https://github.com/rainlab/pages-plugin/issues/13, but maybe you can use the media manager

Flask meta charset inheritance

I am working with Flask in order to develop a web page.
I have done a layout.html file with a header in which I include the
encoding.
When I develop a new html file, I extend the layout.html file.
{% extends "layout.html" %}
{% block content %}
<h2>{{ title }}.</h2>
<h2>Introducción</h2>
{% endblock %}
My problem is that the meta encoding is not being taken and i cant write in Spanish.
Any one knows what to do?