Continue’ button on checkout page in opencart does not works - opencart

Button "continue" on checkout page under delivery details doesn't work, but The ‘billing details’ continue button and other always seems to work. When click on the button, the waiting GIF is loaded and nothing happen.

This is because you do not have FancyBox. No dought you are using 1.5v and you are getting jQuery bugs. Check Firebug I am sure it will confirm. Just download and put Fancybox in.
1) Download FancyBox
(http://fancyapps.com/fancybox/#license)
2) Upload after extracting to:
www.yoursite.com/fancybox
(just leave it in the root or a CDN)
3) Open
opencart>catalog>view>theme>default>template>common>header.tpl
or if you have your javascript libraries in footer:
opencart>catalog>view>theme>default>template>common>footer.tpl
Add after common.js
<script type="text/javascript" src="/fancybox/jquery.fancybox.js?v=2.0.6"></script>

Related

Find download URL from datatables "CSV" button?

This R Shiny application appears to use DT to display its tables. At least in the source code I see:
<script src="plotly-binding-4.10.0/plotly.js"></script>
<link href="datatables-css-0.0.0/datatables-crosstalk.css" rel="stylesheet" />
<script src="datatables-binding-0.20/datatables.js"></script>
<link href="crosstalk-1.2.0/css/crosstalk.min.css" rel="stylesheet" />
<script src="crosstalk-1.2.0/js/crosstalk.min.js"></script>
It also has a "CSV" button to download the data:
How do I download the data from this website myself without clicking? I suppose the button runs some javascript, which makes a network call, but the "network" tab of the chrome debugger doesn't show any activity.
Ideally I could find a URL to the data, and then I could use the language of my choice (e.g., wget, curl, python, ..).
Looks like the raw data are coming from here via the project github. Seems like git pull could do it for you pretty easily.
https://github.com/Metropolitan-Council/covid-poops/blob/main/R/d_covid_cases.R
https://static.usafacts.org/public/data/covid-19/covid_confirmed_usafacts.csv?_ga=2.86006619.233414847.1642517751-2016304881.1642174657
And the other data are in this repo.
https://github.com/Metropolitan-Council/covid-poops/tree/main/data
I was able to use the python requests library to pull the raw data.
import requests
x = requests.get('https://static.usafacts.org/public/data/covid-19/covid_confirmed_usafacts.csv?_ga=2.86006619.233414847.1642517751-2016304881.1642174657')
print(x.text)
Edit: It looks like the shiny data are coming from here. I would just grab them via git. The github readme states, "The Shiny app is located in ./metc-wastewater-covid-monitor. /data contains relevant CSV data and /www contains CSS, HTML, and relevant font files the app needs upon running."
https://github.com/Metropolitan-Council/covid-poops/tree/main/metc-wastewater-covid-monitor/data
You can write a script to use a headerless browser to navigate to the page and download the file. Selenium is the usual first choice for this kind of work.

How to customize django-rosetta admn page

Since when I open django-rosetta on the admin page by setting ROSETTA_SHOW_AT_ADMIN_PANEL = True in the settings file. I am able to open it on the admin page, but when it opens it takes full-page, and I am unable to go back to the homepage(as there is no button) except when I press the back button of the browser. Is there any solution for this, or do I have to override the rosetta home page?
eventually i have to override html page for this, no other option :(

Open remote page as modal view in bootstrap

I thought this is very simple think to do, but I can't found it on internet.
How could I open outside page ( like https://google.com/ ) as a modal view?
I don't want to:
Open page in new tab
Open page in new popup window like:
onClick="MyWindow=window.open('http://www.google.com','MyWindow',width=600,height=300)
Open my own pre-prepared page as described here
Is there a way to do this? It should be reight?
You can try to use iframe:
<iframe src="https://google.com"></iframe>

Sitecore 7 - Use Web Forms for Marketers Form in popup modal

I'm working on setting up a gateway form on a Sitecore 7.2 site using the Web Forms for Marketers module that installed and the fancybox plugin that the site has (the site is using fancybox version 1.3.4, and I cannot update this version or it may break other features on the site that are using this plugin).
This is how the form is supposed to work: The user clicks a link on a page and this opens a popup window with a form they must fill out before they can access a download.
So far, I have gotten things working so that, when a link is clicked on a page, the fancybox modal opens and displays the WFFM form.
Here is the jQuery that does this:
jQuery.noConflict();
(function($) {
$(document).ready(function() {
// Open the gateway form into a fancybox modal
//check to see if there is a gateway form link on the page
if ($(".protected-item").length > 0) {
//if so, then we want to target the click event
$('.protected-item').click(function(event) {
event.preventDefault();
//Get the value of the href of the link since this url will contain the page with the gateway form
var url = $('.protected-item').attr('href');
//open the page with the gateway form in the fancybox modal
$.fancybox({
'autoDimensions': true,
'height': 400,
'width': 400,
'scrolling': 'no',
'href': url,
'autoScale': true,
});
});
}
});
})(jQuery);
What I have done is created a generic page in Sitecore (I called in Gateway Form Test Page) and inserted the test gateway form onto it. Then, on the page I want to feature the gateway form on, I have linked some text ("click here") to that Gateway Form Test Page.
The problem is that, upon hitting the submit button for the WFFM form, the page sends me to the url where the form is located (i.e. domainname/OtherPages/GatewayFormTestPage.aspx) instead of just reloading the fancybox window and displaying the success message or an error message if not all fields are filled in.
I tried setting the type to 'iframe' for the fancybox modal, but all that did was render an empty popup (no content displayed in the fancybox-content block, either--I inspected the element in Chrome's dev tools).
Is there a way that I can wrap the WFFM form in an iframe so I can avoid going to another page when clicking "submit?" I want the user to stay within the popup modal at all times.
Thanks, and I know this is probably a convoluted process, and I wish I could choose a better solution but this is what I must work with.
I think that using iframe is not right approach for your task. It is better to use AJAX requests instead of iframe.
You should check "Is Ajax Mvc Form" on form item to reload only form without page postback. It will allow you get form update without full reloading page.
If you are using WebForms(not MVC) then you can wrap WFFM form into update panel.(not very good for performance and transparency)
And tip about usage WFFM: you should use it only in cases when fields/actions will be managed by marketers. You don't need to use it for all forms on site. Make sure that it is not your case.

How can I edit my templates in SquareSpace?

I'm hosting my blog in SquareSpace, and I need to add a <Script> tag at the footer of every post.
In the middle of this <Script> tag, I need to replace a value with the permalink for the current post.
So, in my home page, where I'm showing 5 posts, I need this <Script> to show up 5 times, each time with the permalink of the corresponding post inside it.
In wordpress, I can directly edit the HTML of posts, and I can do:
<script type="text/javascript">
var myVar = "<?php the_permalink() ?>";
... more code ...
</script>
How can I do this with SquareSpace?
I haven't found anywhere to edit the templates directly.
Thanks!
Daniel
I'm not exactly sure what you want to do or how to do it in Squarespace but here are a couple tips / resources:
If you login and go to your blog page, then switch to 'Structure Editing Mode' by clicking the cubes icon at the top right of the screen, you can then access the 'Configure this page' button for the blog page. In the configuration settings for the blog you can add the Permalink button to the bottom of every post.
If you login and go to 'Website Configuration' at the top left, then go to 'Website Settings > Code Injection' you can select different areas to edit. You might be able to do what you need here. You may need to upgrade your account to access the particular Code Injection Point you want to edit.
Another option is to just use the code injection point (no account upgrade needed) to apply the script in some way.
A great Squarespace resource is the Developers Forum at http://developers.squarespace.com
I hope this helps!!