Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ptrckk

Members
  • Joined

  • Last visited

Everything posted by Ptrckk

  1. Hi, I'm trying to connect a POS System to a Magento webshop, so the products etc will be automatically updated. I know this is possible by using a Cron Job php file. It would work fine using task manager to export and the Cron job to import. Now i bumped into a problem.. The table names don't match, so it wouldn't accept the import file. For example, in the POS System the SKU is named by "artnr" and in Magento it's named by "SKU". I have no idea where to start with this and was wondering if someone can help me in to the right direction to let the names be automatically changed. Can this be added in the Cron Job or does it has to be something else ? This is the Cron Job file: <? // ONLY WORK VIA CRON OR SSH: /usr/bin/php -f /var/www/magento/cron_import.php if ($_SERVER["SERVER_ADDR"] != $_SERVER["REMOTE_ADDR"]){ exit ("can only run locally"); } $profileId = $argv[1]; if (! isset($profileId)){ exit ("\nPlease specify a profile id. You can find it in the admin panel->Import/Export->Profiles.\nUsage: \n\t\t php -f $argv[0] PROFILE_ID\n\t example: php -f $argv[0] 7\n"); } $logFileName= 'import-log.log'; $recordCount = 0; require_once 'app/Mage.php'; ob_implicit_flush(); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); Mage::log("Starting import",null,$logFileName); $profile = Mage::getModel('dataflow/profile'); $userModel = Mage::getModel('admin/user'); $userModel->setUserId(0); Mage::getSingleton('admin/session')->setUser($userModel); #echo "got singleton\n"; if ($profileId) { $profile->load($profileId); if (!$profile->getId()) { Mage::getSingleton('adminhtml/session')->addError('ERROR: Could not load profile'); } } Mage::register('current_convert_profile', $profile); #echo "running profile\n"; $profile->run(); ##echo "done\n"; $batchModel = Mage::getSingleton('dataflow/batch'); if ($batchModel->getId()) { #echo "getId ok\n"; if ($batchModel->getAdapter()) { #echo "getAdapter ok\n"; $batchId = $batchModel->getId(); $batchImportModel = $batchModel->getBatchImportModel(); $importIds = $batchImportModel->getIdCollection(); $batchModel = Mage::getModel('dataflow/batch')->load($batchId); $adapter = Mage::getModel($batchModel->getAdapter()); foreach ($importIds as $importId) { #echo "importing $importId\n"; $recordCount++; try{ $batchImportModel->load($importId); if (!$batchImportModel->getId()) { $errors[] = Mage::helper('dataflow')->__('WARNING: Skip undefined row'); continue; } $importData = $batchImportModel->getBatchData(); try { $adapter->saveRow($importData); } catch (Exception $e) { Mage::log($e->getMessage(),null,$logFileName); continue; } if ($recordCount%10 == 0) { Mage::log($recordCount . ' products imported',null,$logFileName); } } catch(Exception $ex) { Mage::log('File ' . $recordCount . ', SKU ' . $importData['sku']. ' - ERROR: ' . $ex->getMessage(),null,$logFileName); } } foreach ($profile->getExceptions() as $e) { Mage::log($e->getMessage(),null,$logFileName); } } } #printf("OK\n"); Mage::log("Completed!",null,$logFileName); ?> Thanks in advance!
  2. Thanks alot! It worked!
  3. Hello, I was wondering if someone could help me with my following problem, I want a real basic text ticker in the top of my page and it has to take all the information from the database. I found this ticker called "jquery_news_ticker" and it does a perfect job for my cause. But everytime it takes the information from the database it shows the ticker multiple times below each other. I searched on the internet and found that it was a loop problem, I should put it in a while loop and then it should function normally. But there comes my problem, I cannot get it functioning. Here is my code without while loop (showing it multiple times): <?php include_once 'handler.php'; $teams = getTeams(); ?> <?php foreach ($teams as $team) { $leden = getLeden($team["id"]); ?> <link href="jquery_news_ticker/styles/ticker-style.css" rel="stylesheet" type="text/css" /> <script src="jquery_news_ticker/includes/jquery.ticker.js" type="text/javascript"></script> <ul id="js-news" class="js-hidden"> <li class="news-item"><a href="#"><?php echo $team ["telefoon"]; ?></a></li> </ul> <script type="text/javascript"> $(function () { $('#js-news').ticker(); }); </script> <?php } ?> Hopefully someone could help me with this problem.. Thanks in advance! ps. I'm just a beginner with PHP..
  4. It's solved, there was a problem with loading the jquery or something. I've checked the jquery with Firebug and it showed me a HTML code instead of the js itself. For people that come across a simulary problem, check everything with alert('$message'); If I did this from the start, I would have solved it so much faster. Thanks for the help and comments though!
  5. Still not working unfortunately...
  6. Tried that, but no results..
  7. D4Y0, tried it but still no effect. Also I've added wp_enqueue_script and add_action but no results.. Read the link and I have no idea where it goes wrong. I started to question the javascript itself so I checked it with HTML, and it's working normal. There are no Errors or what so ever, is there something I might forget to check? This is my Header.php <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> <?php wp_title(); ?> </title> <link href="style.css" rel="stylesheet" type="text/css" /> <link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet"" type="text/css"" /> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/menujs/jquery.js"></script> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/menujs/jquery-easing-1.3.pack.js"></script> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/menujs/jquery-easing-compatibility.1.2.pack.js"></script> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/menujs/jquery.easing.min.js"></script> <script type="text/javascript" src="js/menujs/jquery.js"></script> <script type="text/javascript" src="js/menujs/jquery-easing-1.3.pack.js"></script> <script type="text/javascript" src="js/menujs/jquery-easing-compatibility.1.2.pack.js"></script> <?php menu(); ?> </head> <body> <div id="header"> <div class="jimgMenu"> <ul> <li class="landscapes"><a href="#">test</a></li> <li class="people"><a href="#">test2</a></li> <li class="nature"><a href="#">test3</a></li> <li class="abstract"><a href="#">test4</a></li> <li class="urban"><a href="http://localhost/test-2/">test5</a></li> </ul> </div> </div> </body> </html> I've let everything in it, thought that one must work.. Here is my functions.php: <?php add_theme_support( 'wp_enqueue_scripts', 'menu' ); add_action( 'wp_enqueue_scripts', 'menu' ); function menu() { wp_register_script( 'menu', get_template_directory_uri(). '/js/menujs/jquery.js' ); wp_register_script( 'menu', get_template_directory_uri(). '/js/menujs/jquery-easing-1.3.pack.js' ); wp_register_script( 'menu', get_template_directory_uri(). '/js/menujs/jquery-easing-compatibility.1.2.pack.js' ); wp_register_script( 'menu', get_template_directory_uri(). '/js/menujs/jquery.easing.min.js' ); wp_enqueue_script( 'menu'); } ?> I've tried a lot of possibilities but no reaction on the page at all. If I load the script in the header.php, I don't have to call it in index.php as well right ? I've got a idea that it's such a small thing, that annoys me the most
  8. Hi, I'm having a problem adding javascripts to PHP. I'm trying to create a theme for Wordpress. I've read that the HTML way for adding js is a bad idea for PHP. But after reading a lot of tutorials I still don't get it... Could someone tell me what I'm missing here? This is my Functions.php <?php add_theme_support( 'wp_enqueue_scripts', 'menu' ); function menu(){ wp_register_script( 'menu', get_template_directory_uri() . '/js/menujs/jquery.js', array('jquery'), '1.0', true ); wp_register_script( 'menu', get_template_directory_uri() . '/js/menujs/jquery-easing-1.3.pack.js', array('jquery'), '1.0', true ); wp_register_script( 'menu', get_template_directory_uri() . '/js/menujs/jquery-easing-compatibility.1.2.pack.js', array('jquery'), '1.0', true ); wp_register_script( 'menu', get_template_directory_uri() . '/js/menujs/jquery.easing.min.js', array('jquery'), '1.0', true ); } ?> I wanted to add it to the Header.php <?php menu(); ?> I thought this was the right way to add them.. I also tried <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/menujs/jquery.js"></script> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/menujs/jquery-easing-1.3.pack.js"></script> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/menujs/jquery-easing-compatibility.1.2.pack.js"></script> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/menujs/jquery.easing.min.js"></script> Added this to the Header.php I might be just stupid, but I hope someone could explain this to me.. Thanks in advance!
  9. Hi, My name is Patrick and I'm from the Netherlands. I'm 20 years old and recently started with web design. In the past I've created some basic websites, HTML, Javascript & CSS only. I'm working currently for a company that invests in me for growing in web design, so I'm learning PHP right now, and thought it was a good time to introduce myself to this forum. If there are any questions, feel free to ask!
  10. I'm wondering if you read what you wrote right there. I don't got time to learn PHP right now, because the person that wants the website needs it asap. Thank you, i will take a look at that!
  11. Hi, I've got a problem and I can't figure out how to solve it.. I create website's in HTML, CSS and Javascript but now i started to use Wordpress because i have no knowledge of PHP. I've read that you just need knowledge of HTML to use Wordpress, but everything is in PHP & CSS. So here is my question, Is there a way to convert a full HTML&CSS based website to PHP? Or does anyone has a better solution to make HTML based website's in Wordpress? I never used those "Click & Play" programs and I need to creat a webshop right now, but a decent cart is always in PHP.. That's why i started to use it right now.. Hopefully you guys understand my problem. Thanks! Ps. I don't got the time to learn PHP fully right now.
  12. Ptrckk replied to Ptrckk's topic in Frontend
    I cannot put the site online because it's not mine.. Can i do this on a different way here ?
  13. Ptrckk replied to Ptrckk's topic in Frontend
    Thanks, i've tried this but didn't work. Wasn't sure where the problem could be, but i've got a deadline so i made it just in HTML, for the ones who want to know: <a href="http://google.nl" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Frisdrank','','Images/Frisdrank1.gif',1)"><img src="Images/Frisdrank.gif" alt="Frisdrank" name="Frisdrank" width="192" height="192" border="0" id="Frisdrank" /></a>
  14. Ptrckk posted a topic in Frontend
    Hi all, I've got a problem, I want a couple of images under each other who are clickable. If you go over the image they need to change. If I take one image it works, but if I take a couple of image's they are clickable but they don't change the image's.. -- Here are my scrips if i use one image(What does work): HTML: <div class="frisdrank"></div> <a href="[url="http://google.nl/"]http://google.nl/[/url]" onmouseover='thinkwithsatish.src="Images/Frisdrank1.gif" ' onmouseout='thinkwithsatish.src="Images/Frisdrank.gif" '><center><img src="Images/Frisdrank.gif" NAME="thinkwithsatish"/></center></a> </div> CSS: .frisdrank { display:block; background:transparent url(Images/Frisdrank.gif); } .frisdrank:hover{ background-image: url{images/Frisdrank1.gif; } And here if I take more pictures(Does not work): HTML: <div class="right"> <a class="frisdrank" href="[url="http://google.nl/"]http://google.nl/[/url]" onmouseover='thinkwithsatish.src="Images/Frisdrank1.gif" ' onmouseout='thinkwithsatish.src="Images/Frisdrank.gif" '><center><img src="Images/Frisdrank.gif" NAME="thinkwithsatish"/></center></a> <a class="Wijnen" href="[url="http://google.nl/"]http://google.nl/[/url]" onmouseover='thinkwithsatish.src="Images/Wijnen1.gif" ' onmouseout='thinkwithsatish.src="Images/Wijnen.gif" '><center><img src="Images/Wijnen.gif" NAME="thinkwithsatish"/></center></a> </div> CSS: .right { width:192px; height:100%; background-color:#fff; float:right; } .frisdrank { display:block; background:transparent url(Images/Frisdrank.gif); } .frisdrank:hover{ background-image: url{images/Frisdrank1.gif; } .Wijnen { display:block; background:transparent url(Images/Wijnen.gif); } .Wijnen:hover{ background-image: url{images/Wijnen1.gif; } -- The .right CSS script is just for possitioning, when I drop it, it still doesn't work. Hope someone knows what I'm doing wrong.. Trying to make it work for a couple of days now and still no succes at all.. Thanks in advance!

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.