This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>{{ title }}</title> | |
<meta name="description" content="{{ description }}"> | |
<meta name="author" content="selmantunc.com"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from jinja2 import Environment, FileSystemLoader | |
import os | |
# Import modules for CGI handling | |
import cgi, cgitb | |
# Capture our current directory | |
THIS_DIR = os.path.dirname(os.path.abspath(__file__)) | |
def print_html_doc(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import cgi, cgitb | |
# Create instance of FieldStorage | |
form = cgi.FieldStorage() | |
if form.getvalue('name_lastnema'): | |
name_ = form.getvalue('name_lastnema') | |
# Get data from fields |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
#test için http://localhost:8000/cgi-bin/get_example.py?first_name=selman&last_name=tunc | |
# Import modules for CGI handling | |
import cgi, cgitb | |
# Create instance of FieldStorage | |
form = cgi.FieldStorage() | |
# Get data from fields | |
first_name = form.getvalue('first_name') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
CSV ye export edilmiş müşteri datasının magento içerisine alınmasını sağlayan kod parçası. | |
*/ | |
ini_set('display_errors', '1'); | |
error_reporting(E_ALL); | |
include "app/Mage.php"; | |
header('Content-type: text/plain; charset=utf-8'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
CSV ye export edilmiş newsletter üyelerinin sadece newsletter a atanmasını sağlayan kod parçası. | |
*/ | |
$store_id = 1; | |
$csv_filepath = "subscriber.csv"; | |
$csv_delimiter = ','; | |
$csv_enclosure = '"'; | |
$magento_path = __DIR__; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku); | |
if ($product) { | |
$productId = $product->getId(); | |
$stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId); | |
$stockItemId = $stockItem->getId(); | |
$stock = array(); | |
if (!$stockItemId) { | |
$stockItem->setData('product_id', $product->getId()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Magentoda yer alan simple ürünleri okuyup yerine configurable ürün açan kod parçası | |
*/ | |
ini_set('display_errors', '1'); | |
error_reporting(E_ALL); | |
include "app/Mage.php"; | |
header('Content-type: text/plain; charset=utf-8'); | |
Mage::app(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Remove all category */ | |
require_once('app/Mage.php'); | |
ini_set('display_errors', 1); | |
set_time_limit(0); | |
Mage::setIsDeveloperMode(true); | |
Mage::app(); | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Başka bir eticaret script inden export edilmiş CSV yi düzenleyip magentoya ürün olarak ekleyen kod parçası. | |
*/ | |
//print_r($urunler); | |
/* | |
* | |
* [0] => StokNo | |
[1] => urunADI |
OlderNewer