I am new to Magento. I have created a category in the back end of Magento. There are quite few threads about how to assign a product to a category, however I don’t understand which file should I use to use that code: Programatically add Magento products to categories How to assign categories for product…
Tag: javascript
Datepicker in wrong position
I am developing an php aplication and I used datepicker javascript. The problem with this is that if I scroll down it does not appear in the right position. It gets really bad if the page gets too long, the date picker is not even visible. I am using IExplorer, it might be outdated. It is not a solution to
Chart.js – Creating multiple charts on one page
I would like to use chart.js in my joomla-component called “bestia”. To do so I imported chart.js as media-element in the manifest.xml. I’m calling the js by doing the following: JHtml::script(Juri::root() . ‘media/com_hostinghelden/chartjs/Chart.js’); Now I would like to use a h…
Calculate the distance between 2 position Google maps Api
We want to create a Line Bus of our City , what kind of Maps Api , we can use , My friend proposed to use Google Map Api. We want to know howto get the distance between 2 places in meter , i found the …
window.history.pushState refreshing the browser
I am working on some javascript code, and using window.History.pushState to load new HTML pages, instead of using href tags. My code (which is working fine) looks like this. window.History.pushState(…
Including JavaScript in PHP’s json_encode()
I need to generate the following script using PHP and json_encode(). My attempt to do so is as follows. The resultant output is as follows. The quotes around the properties poses no issues, however, the quotes around the JavaScript renders it as a string and not JavaScript. I obviously can’t not quote t…
Get geolocation by Javascript and save it to text file via php
I want to get latitude and longitude of the guest and save them to a text file.. I used this:
Radio not disabling due to loop
This is my radio disabling function. And I will call it when the page is loaded! And the radio button is displayed through loop..! So the radio ids would be like: dis1,dis2 … dis6 But its not disabling it…! I think its because of the while loop, I used..! what should I do..? Answer this line: shou…
Using radio box selection to display multiple DIVs
I need to be able to use three radio buttons to determine which P’s display on a page. All items are queried from a database so there is no fixed number. I’d like to stick with javascript if possible. All is written inside PHP code Tried using the following: Then each P will have the option of 6 p…
Auto-closing a popup with a file to download
I have a file, named download.php, which contains a file to be downloaded, so it has the following headers (declared with PHP): header(“Content-Type: “.pathinfo($_GET[‘file’], PATHINFO_EXTENSION)); …