Skip to content

Instantly share code, notes, and snippets.

@kadko
Last active December 19, 2015 10:19
Show Gist options
  • Save kadko/5939610 to your computer and use it in GitHub Desktop.
Save kadko/5939610 to your computer and use it in GitHub Desktop.
single-product.php file of wosci ecommerce system v6.5
<?php require('includes/application_top.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php
/*
* Print the <title> tag based on what is being viewed.
*/
global $page, $paged;
wp_title( '|', true, 'right' );
// Add the blog name.
bloginfo( 'name' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
/* We add some JavaScript to pages with the comment form
* to support sites with threaded comments (when in use).
*/
if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
/* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
* as styles, scripts, and meta tags.
*/
wp_head();
?>
<!--<script type="text/javascript" src="<?php echo get_bloginfo('template_url');?>/js/jquery-1.9.1.min.js"></script>-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if ie]><meta content='IE=8' http-equiv='X-UA-Compatible'/><![endif]-->
<link href="<?php echo get_bloginfo('template_url');?>/busisky_css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo get_bloginfo('template_url');?>/busisky_css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="<?php echo get_bloginfo('template_url');?>/busisky_css/paralax.css" rel="stylesheet">
<link href="<?php echo get_bloginfo('template_url');?>/busisky_css/main.css" rel="stylesheet"/>
<!--[if lt IE 9]>
<link href="<?php echo get_bloginfo('template_url');?>/busisky_css/ie.css" rel="stylesheet"/>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="<?php echo get_bloginfo('template_url');?>/busisky_js/css3-mediaqueries.js"></script>
<![endif]-->
<script src="<?php echo get_bloginfo('template_url');?>/busisky_js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="<?php echo get_bloginfo('template_url');?>/dosyalar/ms-ajax.js"></script>
<script src="<?php echo get_bloginfo('template_url');?>/busisky_js/bootstrap.min.js"></script>
<script src="<?php echo get_bloginfo('template_url');?>/busisky_js/superfish.js"></script>
<script src="<?php echo get_bloginfo('template_url');?>/busisky_js/jquery.scrolltotop.js"></script>
<script src="<?php echo get_bloginfo('template_url');?>/busisky_js/bootstrap-button.js"></script>
<script type="text/javascript" src="wp-content/themes/twentyeleven/js/jquery.form.js"></script>
<script type="text/javascript" src="wp-content/themes/twentyeleven/highslide/highslide-full.js"></script>
<link rel="stylesheet" type="text/css" href="wp-content/themes/twentyeleven/highslide/highslide.css" />
<script>
jQuery(document).ready(function() {
jQuery("a").each(function(index) {
var hrf = jQuery(this).attr("href");
if (hrf.indexOf("<?php echo tep_session_name();?>") == -1 && hrf.indexOf("javascript") == -1) { // query parametresinde osCsid yoksa ekle. Baþka parametre(ler) varsa & iþareti ile ekle
if ( hrf.indexOf("?") != -1 ) { jQuery(this).attr("href", hrf + "<?php echo '&osCsid='.tep_session_id(); ?>"); }
if ( hrf.indexOf("?") == -1 ) { jQuery(this).attr("href", hrf + "<?php echo '?osCsid='.tep_session_id(); ?>"); }
}
});
});
</script>
<!-- Style sheets -->
<style type="text/css">
@font-face {
font-family: 'Free Style';
src: local('☺'), url('wp-content/themes/twentyeleven/fpd/fonts/FRESTYSN.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Nikodecs-fMac';
src: local('☺'), url('wp-content/themes/twentyeleven/fpd/fonts/Nikodecs-fMac.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'itsadzoke-046_fMac';
src: local('☺'), url('wp-content/themes/twentyeleven/fpd/fonts/itsadzoke-046_fMac.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'itsadzokeS02-046_fMac';
src: local('☺'), url('wp-content/themes/twentyeleven/fpd/fonts/itsadzokeS02-046_fMac.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Promocyja_096';
src: local('☺'), url('wp-content/themes/twentyeleven/fpd/fonts/Promocyja_096.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'QumpellkaNo12';
src: local('☺'), url('wp-content/themes/twentyeleven/fpd/fonts/QumpellkaNo12.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Sportrop';
src: local('☺'), url('wp-content/themes/twentyeleven/fpd/fonts/Sportrop.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Yokawerad';
src: local('☺'), url('wp-content/themes/twentyeleven/fpd/fonts/Yokawerad.woff') format('woff');
font-weight: normal;
font-style: normal;
}
</style> <link rel="stylesheet" type="text/css" href="wp-content/themes/twentyeleven/fpd/css/smoothness/jquery-ui-1.9.2.custom.min.css" />
<?php if($_GET['new'] !=''){ ?>
<link rel="stylesheet" type="text/css" href="wp-content/themes/twentyeleven/fpd/css112/main.css">
<link rel="stylesheet" type="text/css" href="wp-content/themes/twentyeleven/fpd/css112/jquery.fancyProductDesigner.css" />
<link rel="stylesheet" type="text/css" href="wp-content/themes/twentyeleven/fpd/css112/jquery.fancyProductDesigner-fonts.css" />
<?php }else{ ?>
<link rel="stylesheet" type="text/css" href="wp-content/themes/twentyeleven/fpd/css112/main.css">
<link rel="stylesheet" type="text/css" href="wp-content/themes/twentyeleven/fpd/css112/jquery.fancyProductDesigner.css" />
<link rel="stylesheet" type="text/css" href="wp-content/themes/twentyeleven/fpd/css112/jquery.fancyProductDesigner-fonts.css" />
<?php } ?>
<!-- Include js files -->
<script src="wp-content/themes/twentyeleven/fpd/js/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>
<?php if($_GET['new'] !=''){ ?><script src="wp-content/themes/twentyeleven/fpd/js/jquery.fancyProductDesigner112.js" type="text/javascript"></script><?php }else{ ?>
<script src="wp-content/themes/twentyeleven/fpd/js/jquery.fancyProductDesigner112.js" type="text/javascript"></script>
<?php } ?>
<script type="text/javascript">
jQuery(document).ready(function() {
//call the plugin and save it in a variable to have access to the API
var ipodDesigner = $('#businnescard-designer').fancyProductDesigner({
editorMode: true, fonts: ['Arial', 'Helvetica', 'Times New Roman', 'Verdana', 'Free Style','Nikodecs-fMac', 'itsadzoke-046_fMac', 'itsadzokeS02-046_fMac', 'Promocyja_096', 'QumpellkaNo12', 'Sportrop', 'Yokawerad'],
customTexts: 'Yazı Ekle',customTextParamters: {x: 210, y: 250, colors: "#000000", removable: true, resizable: true, draggable: true, rotatable: true}
}).data('fancy-product-designer');
$('#image-button').click(function(){
var da = ipodDesigner.createImage();
return false;
});
$('select').change(function(){
//defaultoptions = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22];
//$.each(defaultoptions, function(doin) {
//$('option[value="'+ doin +'"]').css('display','inline');
// });
var doptions = $(this).find("option:selected").attr("data-hide");
var goster = $(this).find("option:selected").attr("data-show");
var sec = goster.split(',');
var optionsarray = doptions.split(',');
$.each(sec, function(sein) {
$('select option[value="'+sec[sein]+'"]').css('display','inline');
$('select option[value="'+sec[sein]+'"]').attr('selected', 'selected');
});
$.each(optionsarray, function(ind) {
$('select option[value="'+optionsarray[ind]+'"]').css('display','none');
});
});
//$('option:selected', 'select').removeAttr('selected');
<?php
if( !empty($_GET['id']) )
{
$posp = strpos($_GET['id'], '{');
$a_tr = substr($_GET['id'],$posp,strlen($_GET['id'])-$posp);
$a_tre = explode('{', $a_tr );
unset($a_tre[0]);
$a_tre = array_values($a_tre);
$va=''; $vir='';
for( $ci=0;$ci < count($a_tre);$ci++ ){
$a_trex = explode('}', $a_tre[$ci] );
$kv[] = array($a_trex[0] => $a_trex[1]);
if($ci == count($a_tre)-1){ $vir ='' ;}else{ $vir = ', '; }
$va .= $a_trex[1].$vir;
}
}
?>
$('option[value="1"]').attr({'data-hide': '7,8,9,22,19,11,10,14,15,17','data-show': '21,12,13,16,20,18'});
$('option[value="2"]').attr({'data-hide': '7,8,9,22,19,11,10,14,15,17,19','data-show': '21,12,13,16,20,18'});
$('option[value="3"]').attr({'data-hide': '21,22,19,11,12,14,15,17,18','data-show': '7,8,9,10,13,16,20,19'});
$('option[value="4"]').attr({'data-hide': '7,8,9,22,10','data-show': '21,12,11,13,14,15,16,17,18,19'});
$('option[value="5"]').attr({'data-hide': '21,22,14,15,17,18','data-show': '7,8,9,10,11,12,13,16,20,19'});
$('option[value="6"]').attr({'data-hide': '7,8,9,21,12,10,15,18','data-show': '22,11,13,14,20,19,16,17'});
var doptions = '7,8,9,21,12,10,15,18';
var goster = '22,11,13,14,20,19,16,17';
var sec = goster.split(',');
var cava = '<?php echo $va; ?>';
var sesec = cava.split(',');
if(cava != ''){
$.each(sesec, function(s_in) {
$('select option[value='+sesec[s_in]+']').attr('selected', 'selected');
$('select option[value='+sesec[s_in]+']').css('display','inline');
});
}
var optionsarray = doptions.split(',');
<?php if( empty($_GET['id']) ) { ?>
$.each(sec, function(sein) {
$('select option[value='+sec[sein]+']').css('display','inline');
$('select option[value='+sec[sein]+']').attr('selected', 'selected');
});
$.each(optionsarray, function(ind) {
$('select option[value="'+optionsarray[ind]+'"]').css('display','none');
});
<?php } ?>
//var aaa = $('select[name="id[7]"]').find("option:selected").val();
//$('select option[value="'+aaa+'"]').attr('selected', '');
//$('select option:eq(0)').attr('selected', 'selected');
$("#ajax-attachment-upload-form").submit(function(form) {
$.each(files, function(index, file) {
$.ajax({url: "/ajax-upload",
type: 'POST',
data: {filename: file.filename, data: file.data,type:"user_upload"},
success: uploadHandler
});
});
files = [];
form.preventDefault();
});
//click handler for input upload
$('#upload-button').click(function(){
$('#design-upload').click();
return false;
});
//upload design
document.getElementById('design-upload').onchange = function (e) {
var files = [];
//check if FileReader is supported
if(window.FileReader) {
var reader = new FileReader();
reader.readAsDataURL(e.target.files[0]);
reader.onload = function (e) {
var image = new Image;
image.src = e.target.result;
//alert(image.src);
$.ajax({ url: "save_image.php",
type: 'POST',
data: {filename: "", data: image.src, type:"user_upload", osCsid:"<?php echo tep_session_id(); ?>"}
//success: uploadHandler
});
files = [];
image.onload = function() {
//max. width and height for the uploaded image
var maxWidth = 200,
maxHeight = 320,
scaling = 1;
//calculate scaling
if(this.width > maxWidth && this.width >= this.height) {
scaling = maxWidth / this.width;
}
if(this.height > maxHeight && this.height > this.width) {
scaling = maxHeight / this.height;
}
//add new image to product
ipodDesigner.addElement('image', e.target.result, 'my custom design',
{zChangeable: true, removable: true, draggable: true, resizable: true, rotatable: true, x: 200, y: 200, scale: scaling.toFixed(2)}
);
};
};
}
else {
alert('FileReader API is not supported in your browser, please use Firefox, Safari, Chrome or IE10!')
}
};
<?php
/*
$('#checkout-button').click(function(){
ipodDesigner.getProduct(false); //see output panel
return false;
});
*/
?>
function _getProductOutput(product) {
var output = '<strong>Product:</strong> '+product.title;
output += '<br /><strong>Elements:</strong>';
output += '<p>';
$(product.elements).each(function(i, elem) {
output += '<strong>Title:</strong> ' + elem.title;
output += '<br />';
output += '<strong>Parameters:</strong><br />';
for (var prop in elem.parameters) {
output += prop + ": " + elem.parameters[prop] + ', ';
}
output = output.substring(0, output.length-2);
output += '<br /><br />';
});
output += '</p>';
return output;
};
function _getProductOutput2(product) {
var output = '<product title="' + product.title + '">';
//output += '';
//output += '';
$(product.elements).each(function(i, elem) {
output += '<element title="' + elem.title + '">';
//output += '';
output += '<parameters><![CDATA[';
for (var prop in elem.parameters) {
var intRegex = /^\d+$/;
if(intRegex.test(elem.parameters[prop] )) {
output += '"'+ prop + '": ' + elem.parameters[prop] + ', ';
}else{
if( elem.parameters[prop] == true || elem.parameters[prop] == false ) { output += '"'+ prop + '": ' + elem.parameters[prop] + ', '; }else{
output += '"'+ prop + '": "' + elem.parameters[prop] + '", ';
}
}
//alert(output);
}
output += ']]></parameters>';
//output = output.substring(0, output.length-2);
// output += '';
output += '</element>';
});
output += '</product>';
return output;
};
<?php $proid = get_the_ID(); $outparams = $cart->editor['output'][$_GET['id']]; ?>
<?php if(!empty($_POST['reset'])){ unset($outparams); tep_session_unregister('output'); echo '$("input[name=reset]").val("");'; unset($_POST['reset']); } ?>
var ay_pr = $(".fpd-views li:eq(1)").clone();
var ay_elm = $(".fpd-product:eq(1)").clone();
var ayuz = $(".fpd-views li:eq(1)").length;
if(ayuz ==0){
$("#ayo").remove();
}
$('#sifirla').click(function(){
var ld = ipodDesigner.loadDefault(0);// sadece editable elementler için true
//var ld1 = ipodDesigner.loadDefault(1);// sadece editable elementler için true
//$(".fpd-views").append(ay_pr);
$(".fpd-product").append(ay_elm);
});
$('#aye2').click(function(){
//$(".fpd-views").append("<li><img src='wp-content/themes/twentyeleven/fpd/images/businesscard/previewarka.png' title='Kartvizit Arka Yüzü'></li>");
});
$('#ayo').click(function(){
//var ld = ipodDesigner.loadDefault(0);// sadece editable elementler için true
//alert(ld);
$('option[value="19"]').css('display','none');
$('option[value="18"]').attr('selected', 'selected');
$(".fpd-views li:eq(1)").remove();
$(".fpd-product:eq(1)").remove();
});
$(".fpd-views li:eq(1)").click(function(){
$('option[value="18"]').css('display','none');
$('option[value="19"]').attr('selected', 'selected');
});
hs.showCredits = false;
hs.allowMultipleInstances = false;
hs.allowWidthReduction = true;
jQuery('#jsonForm').ajaxForm({
// dataType identifies the expected content type of the server response
dataType: 'json',
beforeSubmit: function processJson(data) {
var btn = $("#add_to_cart")
btn.button('loading')
},
// success identifies the function to invoke when the server response
// has been received
success: processJson2
});
$('#add_to_cart').mouseover(function() {
var product = ipodDesigner.getProduct(false);// sadece editable elementler için true yapilmali
var output = '';
if(product instanceof Array) {
for(var i=0; i < product.length; ++i) {
output += _getProductOutput2(product[i]);
}
}
else {
output = _getProductOutput2(product);
}
edihtml = $('#businnescard-designer').html();
$('#thsirt-output').html(output);
$('#editor-output').val(output);
//$('.nav-tabs a[href="#output-content"]').tab('show');
return false;
});
function processJson2(data) {
<?php
/*
//alert( data['contents'] );
console.log( JSON.stringify(data['contents']) );
console.log(uprids);
//alert(JSON.stringify(data['contents']).indexOf(uprids) !== -1);
var gti = "<?php echo get_the_ID(); ?>{";
var n = uprids.substr(0, gti.length);
var dc = JSON.stringify(data['contents']);
var coar = dc.replace('[', ''); coar = coar.replace(']', ''); coar = coar.replace(/["']/g, '');
coar = coar.split(",");
cartin =""; var inca ="";
$.each(coar, function(cai) {
cartin = coar[cai].substr(0, gti.length);
if(n == cartin){ inca ='yes' }
});
if( JSON.stringify(data['contents']).indexOf(uprids) !== -1 ){
alert("Bu tasarım aynı basım seçenekleri ile sepetinizde zaten mevcut. Basım unite sayısı 1 adet artırıldı. Sepetinizden miktar güncelleme ve ürün silme işlemleri yapabilirsiniz.");
}
if(JSON.stringify(data['contents']).indexOf(uprids) ==-1 && inca == 'yes'){
alert("Bu tasarım farklı basım seçenekleri ile sepetinizde zaten mevcut. Farklı bir ürün olarak sepetinize eklendi. Sepetinizden miktar güncelleme ve ürün silme işlemleri yapabilirsiniz.");
}
*/
?>
var product = ipodDesigner.getProduct(false);// sadece editable elementler için true yapilmali
ipodDesigner.createImage();
//console.log(data['message']);
}
$(document).on('imageCreate', function(evt, canvas, base64Image){// on, bind ..
//you could send the 64 bit encoded image to php and save it as an image on your webserver
console.log(base64Image);
var sel = $('select[name^="id"]');
console.log(sel.length);
uprid = ""; var sin = "";
$.each(sel, function(inde) {
sin = (sel.length-1)-inde;
selname = $('select[name^="id"]:eq('+sin+')').attr("name");
selname = selname.replace('[', ''); selname = selname.replace(']', ''); selname = selname.replace('id', '');
uprid += "{"+selname+"}" + $('select[name^="id"]:eq('+sin+')').val();
});
uprids = <?php echo get_the_ID(); ?>+uprid;
$.ajax({
type: "POST",
url: "save_image.php",
data: { base64_image: base64Image, products_id:uprids, pID: "<?php echo get_the_ID(); ?>", osCsid: "<?php echo tep_session_id(); ?>" }
})
.done(function( msg ) {
// alert( "Data Saved: " + msg );
hs.htmlExpand (null, { wrapperClassName: 'draggable-header',
outlineType: 'rounded-white', dimmingOpacity: 0.7, objectType: 'iframe', src:'cart_pop.php?product_uid='+uprids+'&pid='+<?php echo get_the_ID(); ?>+'&test=sepet&<?php echo tep_session_name();?>=<?php echo tep_session_id();?>&product=<?php echo $_GET['product'];?>'} );
var btn = $('#add_to_cart')
btn.button('reset')
// $(".cart-count").text(data['cart_total']);
return false;
})
.fail(function() { alert("hata"); });
});
<?php
/*
var jqxhr = $.ajax( "example.php" )
.done(function() { alert("success"); })
.fail(function() { alert("error"); })
.always(function() { alert("complete"); });
// perform other work here ...
// Set another completion function for the request above
jqxhr.always(function() { alert("second complete"); });
*/
?>
$("body").on("change", ".subsel", function(e){
var multi = []; var prefix = ''; var totalp = 0; var opprice = 0; var cprice = 0;
$( ".subsel" ).each(function( subsin ) {
prefix = $(this).find(":selected").attr("data-prefix");
if(prefix =="+"){
opprice += + $(this).find(":selected").attr("data-price");
}
if(prefix =="-"){
opprice -= - $(this).find(":selected").attr("data-price");
}
var opr = $(this).find(":selected").attr("data-price");
if(prefix =="*" && opr > 0 ){
mupri = $(this).find(":selected").attr("data-price");
multi.push(mupri);
}
});
var lengthm = multi.length;
element = null; var multip = 1;
for (var i = 0; i < lengthm; i++) {
multip *= multi[i];
// Do something with element i.
}
opprice = multip*opprice;
<?php $f = get_post_custom_values('Price'); ?>
opprice = opprice + <?php echo $f[0]; ?>
$("#total_price").text(opprice.toFixed(2));
});
var mupri2= ""; var opprice = 0; var multi2 = [];
$( ".subsel" ).each(function( subsin ) {
prefix = $(this).find(":selected").attr("data-prefix");
if(prefix =="+"){
opprice += + $(this).find(":selected").attr("data-price");
}
if(prefix =="-"){
opprice -= - $(this).find(":selected").attr("data-price");
}
var opr = $(this).find(":selected").attr("data-price");
if(prefix =="*" && opr > 0 ){
mupri2 = $(this).find(":selected").attr("data-price");
multi2.push(mupri2);
}
});
var lengthm2 = multi2.length;
element = null; var multip2 = 1;
for (var i = 0; i < lengthm2; i++) {
multip2 *= multi2[i];
// Do something with element i.
}
opprice = multip2*opprice;
<?php $f = get_post_custom_values('Price'); ?>
opprice = opprice + <?php echo $f[0]; ?>
$("#total_price").text(opprice.toFixed(2));
});
</script>
<script type="text/javascript">
hs.graphicsDir = 'wp-content/themes/twentyeleven/highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.width = '400';
hs.lang = {
loadingText : null,
};
</script>
<style type="text/css">
.highslide-dimming {
background: gray;
}
</style>
<script type="text/javascript">
hs.wrapperClassName = 'draggable-header no-footer';
hs.anchor = 'top right';
// Offset X and Y - this requires highslide-full.js
hs.Expander.prototype.onBeforeExpand = function() {
if (!this.hasAddedOffset) {
this.x.pos += -75;
this.y.pos += -90;
}
this.hasAddedOffset = true;
}
// Add the pointer
hs.registerOverlay({
html: '<div class="tooltipX"></div>',
position: 'top right',
hideOnMouseOut: false,
fade: false,
opacity: 1,
useOnHtml: true
});
</script>
<script type="text/javascript">
<!--
jQuery(document).ready(function() {
});
// -->
</script>
<style type="text/css">
.tooltipX {
position: absolute;
top: 95px;
right: -60px;
width: 55px;
height: 41px;
background: url('wp-content/themes/twentyeleven/highslide/graphics/tooltip2.png') no-repeat;
}
</style>
<!--[if lt IE 7]>
<style type="text/css">
.tooltip {
/* NOTE! This URL is relative to the HTML page, not the CSS */
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='wp-content/themes/twentyeleven/highslide/graphics/tooltip.png', sizingMethod='scale');
background: none;
}
</style>
<![endif]-->
</head>
<?php
//echo $cart->editor['output'];
/*
$html = new DOMDocument();
$html->loadHtml($html1);//loadHtmlFile direk urlden çekmek için
$xpath = new DOMXPath( $html );
$cat1 = trim($xpath
->query( "//div[@class='contenttitle']")
->item(0)->nodeValue
);
*/
// place inside loop
$args = array(
'post_type' => 'attachment',
'numberposts' => 16,
'post_status' => null,
'post_parent' => get_the_ID()
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
//echo apply_filters('the_title', $attachment->post_title);
// the_attachment_link($attachment->ID, false);
$prattachments[] = wp_get_attachment_image($attachment->ID);
$img_links['link'][] = $attachment->guid;
$mo = $attachment->menu_order;
if( 0 == $mo ){ $img_order['mo'][] = $attachment->guid; } else { $img_order['mo'][$mo] = $attachment->guid; }//menu_order 0 ise (sýralama yapýlmadýðýnda olur) otomatik sýralama ekliyoruz.
}
}
if(count($img_order['mo'])>0){
ksort($img_order['mo']);
$img_reorder = array_values($img_order['mo']);
}
?>
<?php $c_terms = get_term_by( 'id', '3', 'product_category', $output, $filter ); ?>
<body>
<section class="navbar">
<div class="navbar-inner main-menu">
<a href="index.php" class="logo pull-left"><img src="<?php echo get_bloginfo('template_url');?>/busisky_img/logo.png" alt=""></a>
<nav id="menu" class="pull-right">
<ul>
<li><a href="./?page_id=2">Tasarımını Yükle<br/><span>Kendi Çalışmalarınız için</span></a></li>
<li class="active"><a href="?product_category=tum-urunler">HAZIR TASARIMLAR<br/><span>Hazır Şablon Ürünler</span></a>
<?php
//list terms in a given taxonomy (useful as a widget for twentyten)
$taxonomy = 'product_category';
$tax_terms = get_terms($taxonomy);
?>
<ul>
<?php
foreach ($tax_terms as $tax_term) {
echo '<li>' . '<a href="' . esc_attr(get_term_link($tax_term, $taxonomy)) . '" title="' . sprintf( __( "View all posts in %s" ), $tax_term->name ) . '" ' . '>' . $tax_term->name.'</a></li>';
}
?>
</ul>
</li>
<li><a href="?page_id=919">BOS SABLONLAR<br/><span>Bos Sablon İndir</span></a></li>
<li><a href="?page_id=624" >FIYATLAR<br/><span>Fiyat hesapla</span></a>
</li>
<!--<li><a href="?product_category=<?php echo $c_terms->slug; ?>" ><?php echo $c_terms->name;?><br/><span>Portfolio Page</span></a></li>-->
<li><a href="account.php" >BILGILERIM<br/><span>Hesap Bilgileriniz</span></a></li>
<li><a href="shopping_cart.php" >SEPET<br/><span>Eklenen Ürünler</span></a></li>
</ul>
</nav>
</div>
</section>
<!--<div class="container-fluid text-introdution">
<div class="row-fluid">
<div class="span12">
<h3><?php echo $c_terms->name; ?></h3>
<span style="float:left;"><h4><?php the_title(); ?> <strong>TASLAĞI</strong></h4></span><?php echo $c_terms->description; ?>
</div>
</div>
</div>-->
<h4 style="font-family:helvetica;margin:16px 0 4px 22px;font-size:1.5em;font-weight:bold;color:#777;"><?php the_title(); ?></h4>
<!--<div class="bg_slider" style="background-color:#ffffff;"></div>-->
<div class="container-fluid content">
<div class="row-fluid">
<div class="span8">
<!--<h4><?php the_title(); ?> <strong>TASLAĞI</strong></h4>-->
<div id="content" class="widget-container" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php /*<div id="nav-above" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyeleven' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyeleven' ) . '</span>' ); ?></div>
</div><!-- #nav-above --> */ ?>
<div id="<?php echo $post->post_type; ?>-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if( $_GET['p'] != '' && $_GET['product'] == '' ){ ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div style="margin:0 0 12px 0 ;"></div>
<?php } ?>
<div class="entry-content">
<?php
/*
<div class="fpd-product" title="Business Card" data-thumbnail="wp-content/themes/twentyeleven/fpd/images/businesscard/preview.png">
<img src="wp-content/themes/twentyeleven/fpd/images/businesscard/bg.png" title="Background" data-parameters='{"x": 10, "y": 120, "colors": "#ffffff"}' />
<img src="wp-content/themes/twentyeleven/fpd/images/businesscard/bg_shadow.png" title="Shadow" data-parameters='{"x": 10, "y": 120}' />
<img src="wp-content/themes/twentyeleven/fpd/images/businesscard/lb.png" title="Left Bottom" data-parameters='{"x": 10, "y": 120, "colors": "#212020"}' />
<img src="wp-content/themes/twentyeleven/fpd/images/businesscard/lc.png" title="Left Center" data-parameters='{"x": 10, "y": 120, "colors": "#1b75bc"}' />
<img src="wp-content/themes/twentyeleven/fpd/images/businesscard/lt.png" title="Left Top" data-parameters='{"x": 10, "y": 120, "colors": "#212020"}' />
<img src="wp-content/themes/twentyeleven/fpd/images/businesscard/rt.png" title="Right Top" data-parameters='{"x": 487, "y": 120, "colors": "#212020"}' />
<img src="wp-content/themes/twentyeleven/fpd/images/businesscard/rc.png" title="Right Center" data-parameters='{"x": 453, "y": 151, "colors": "#1b75bc"}' />
<img src="wp-content/themes/twentyeleven/fpd/images/businesscard/rb.png" title="Right Bottom" data-parameters='{"x": 453, "y": 321, "colors": "#212020"}' />
<span title="Your Company" data-parameters='{"x": 180, "y": 210, "removable": true, "draggable": true, "rotatable": true,"scale": 2, "colors": "#212020,#0000ff,#009ee0,#ff412c", "boundingBox": "Background"}' >Your Company</span>
<span title="Name" data-parameters='{"x": 180, "y": 262, "removable": true, "draggable": true, "scale": 1, "colors": "#212020,#0000ff,#009ee0,#ff412c", "boundingBox": "Background"}' >John Doe | Senior Developer</span>
<span title="Phone" data-parameters='{"x": 206, "y": 326, "removable": true, "draggable": true, "scale": 0.8, "colors": "#272727,#0000ff,#009ee0,#ff412c", "boundingBox": "Background"}' >Phone +49 241 123456789</span>
<span title="Mobile" data-parameters='{"x": 206, "y": 353, "removable": true, "draggable": true, "scale": 0.8, "colors": "#272727,#0000ff,#009ee0,#ff412c", "boundingBox": "Background"}' >Mobile +49 173 123456789</span>
<!-- This is another view -->
<div class="fpd-product" title="Kartvizit Arka Yüzü" data-thumbnail="wp-content/themes/twentyeleven/fpd/images/businesscard/previewarka.png">
<img src="wp-content/themes/twentyeleven/fpd/images/businesscard/arkabg.png" title="Arka düz mavi" data-parameters='{"x": 10, "y": 120, "colors": "#ffffff", "price": 40}' />
<img src="wp-content/themes/twentyeleven/fpd/images/businesscard/arka-desen.png" title="Arka Yüz Desen" data-parameters='{"x": 10, "y": 120, "colors": "#212020"}' />
<!-- <img src="images/yellow_shirt/back/body.png" title="Hightlights" data-parameters='{"x": 277, "y": 79}' />-->
<!-- <img src="images/yellow_shirt/back/shadows.png" title="Shadow" data-parameters='{"x": 123, "y": 81}' />-->
</div>
</div>
*/
?>
<div id="businnescard-designer">
<?php if (!empty($_GET['oID']) || !empty($outparams)){
if (!empty($_GET['oID'])){
$ordered_editor_output = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price, products_currency, currency_value, editor_output from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$_GET['oID'] . "'");
$ordered_output = tep_db_fetch_array($ordered_editor_output);
$ed_output = $ordered_output['editor_output'];
}
if (!empty($outparams) && empty($_GET['oID'])){
$ed_output = $outparams;
$noso='y';
}
$ss = stripslashes(stripslashes($ed_output));
$ss2 = str_replace('""','"', $ss);
$xml = simplexml_load_string('<editor>'.$ss2.'</editor>',null, LIBXML_NOCDATA);
////////////////////////////
function commasemicolondata($key, $csdata,$last=','){
$word = $key;
$lw = strlen($word);
$llng = strlen($last);
$sp = strpos($csdata, $word);
/*echo $sp ;
echo '<br>';*/
$sp2 = strpos($csdata, $last, $sp);
/*echo $sp2 ;
echo '<br>';*/
if($sp === false){
return false;
}else{
return substr($csdata, $sp+$lw , $sp2-$sp-$lw+$llng);
}
}
echo '<div class="fpd-product" title="Kartvizit" data-thumbnail="wp-content/themes/twentyeleven/fpd/images/businesscard/preview.png">';
for($i=0;$i<count($xml->product);$i++)
{
if($i > 0 ){ echo '<div class="fpd-product" title="Kartvizit Arka Yüzü" data-thumbnail="wp-content/themes/twentyeleven/fpd/images/businesscard/previewarka.png">'; }
for($ii=0;$ii<count($xml->product[$i]->element);$ii++){
if (strpos( $xml->product[$i]->element[$ii]->parameters,'"text":') !== false) {
$colorstrrep = str_replace('"colors":','"colors_iptal":',$xml->product[$i]->element[$ii]->parameters);
$colorstrrep2 = str_replace('"currentColor":','"colors":', $colorstrrep);
$colorstrrep3 = str_replace('""','"', $colorstrrep2);
$colorstrrep4 = str_replace(',",', ',', $colorstrrep3);
$sp_txt = commasemicolondata('"source": ', $colorstrrep4);
$sp_txt2 = str_replace('",', '"', $sp_txt);
$sp_txt3 = str_replace('"', '', $sp_txt2);
if($sp_txt === false){ $sp_txt3=''; }
echo "<span title='".$xml->product[$i]->element[$ii]['title']."' data-parameters='{".substr($colorstrrep4, 0, -2)."}'>$sp_txt3</span>";
}else{
/* "colors":'u "colors_iptal": olarak str replace*/
/* "currentColor": 'u "colors": olarak str replace*/
$colorstrrep = str_replace('"colors":','"colors_iptal":',$xml->product[$i]->element[$ii]->parameters);
$colorstrrep2 = str_replace('"currentColor":','"colors":', $colorstrrep);
$el_src = commasemicolondata('"source": ', $xml->product[$i]->element[$ii]->parameters);
if($el_src === false){ $el_src='""'; }
$chkb64 = strpos($xml->product[$i]->element[$ii]->parameters, 'data:image/png;base64,');
if($chkb64 !== false){
$el_src = commasemicolondata('"source": ', $xml->product[$i]->element[$ii]->parameters,'"');
?>
<!-- $el_src en başta tırnak işaretini de getiriyor, hariç tutmak..ok -->
<img src=<?php echo $el_src; ?> title="<?php echo $xml->product[$i]->element[$ii]['title']; ?>" data-parameters='{<?php echo substr($colorstrrep2, 0, -2); ?>}' />
<?php
}else{
echo "<img src=".$el_src." title='".$xml->product[$i]->element[$ii]['title']."' data-parameters='{".substr($colorstrrep2, 0, -2)."}' />";
}
}
}
if($i > 0 ){ echo '</div>'; }
}
echo '</div>';
//////////////////////////
$ik =0;
//while( $ik < count( $xml->product ) ) { }
?>
<?php ?>
<?php
}else{
?>
<?php $ed = get_post_custom_values('editor_'); echo $ed[0]; ?>
<?php
}
?>
</div>
<div id="bottomsec">
<div class="api-buttons clearfix" style="text-align: left;">
<form action="<?php echo $_SERVER['REQUEST_URI'];?>" method="post">
<input name="reset" value="true" type="hidden">
<input type="submit" value ="Tasarımı Sıfırla" id="aye" class="btn btn-primary btn-success"/>
<!--<input type="button" id="sifirla" class="btn btn-primary btn-small" value="Tasarımı Sıfırla"/>-->
<input type="button" id="ayo" class="btn btn-primary btn-success" value="Arka Yüzü Olmasın"/>
<!--<div id="aye2" class="btn btn-primary btn-success">Arka Yüz Ekle</div>-->
<input type="button" id="upload-button" class="btn btn-primary btn-warning" value="Resim Ekle"/>
<input type="file" id="design-upload" style="display: none;" />
</form>
<?php
/*
<form action="<?php echo $_SERVER['REQUEST_URI'];?>" method="post">
<a href="#" id="print-button" class="btn btn-info">Print</a>
<a href="#" id="image-button" class="btn btn-info">Create Image</a>
<a href="#" id="checkout-button" class="btn btn-success">Checkout</a>
<a href="#" id="recreation-button" class="btn btn-success">Recreate product</a>
<a href="#" id="upload-button" class="btn btn-warning">Upload own design</a>
</form>
*/
?>
</div>
</div>
<!--<div class="output" id="thsirt-output"></div>-->
<?php $c = get_post_custom_values('Currency'); $f = get_post_custom_values('Price'); ?>
<?php if($_GET['post_type'] == 'product' || $_GET['product'] != ''){ ?>
<?php
$image_id = get_post_thumbnail_id();
$thumbnail_url = wp_get_attachment_image_src($image_id,'large', true);
?>
<?php
/* <table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="280"><table border="0" width="280" cellspacing="0" cellpadding="2">
<tr>
<td>
<div id="fullimage_link1" style="height:280px;"><a href="<?php echo $thumbnail_url[0]; ?>" class="highslide" onclick="return hs.expand(this,{ outlineType: 'rounded-white', targetX: 'thumb1' })"><?php echo the_post_thumbnail( array(280,280 ));</a></div>
</td>
</tr>
<tr>
<td>
$tp = wp_get_attachment_image_src( get_post_thumbnail_id());
echo '<img width="40" height="40" src="'.$tp[0].'" style="border: 1px solid #eee;" onmouseout=\'removeborder("main")\' onmouseover=\'changeImage("'.$tp[0].'" , "'.$tp[0].'" , "abc","main")\' class="imgmain"/>';
<?php
for($res=0;$res<count($prattachments);$res++){
$getrelative = strrpos($img_reorder[$res], "wp-content/");
$img_orders[] = substr($img_reorder[$res], $getrelative);
$default_attr = array(
'src' => $img_orders[$res],
'class' => 'img'.$res,
'style' => "border: 1px solid #eee;",
'alt' => '',
'title' => '',
'onmouseout' => 'removeborder("'. $res.'")',
'onmouseover' => 'changeImage("'.$img_orders[$res].'" , "'.$img_orders[$res].'" , "'.get_the_title().'","'.$res.'")'
);
echo the_post_thumbnail( array(40,40),$default_attr);
?>
<?php } ?>
</td>
</tr>
</table>
*/
?> </td><td></td><td valign="top"> <div style="float:right;">
<?php
/*
<table width="" border="0">
<tr>
<td colspan="3"><h1 style="font-size:1.8em;line-height:1.2em;padding:0 0 12px 0;word-wrap: break-word;" class="entry-title"><?php the_title(); ?></h1></td>
</tr>
<tr><td colspan="3"><div class="black_dots"></div></td></tr>
<tr>
<td><h1 style="font-size:1.8em;" id="product_price" class="main-price"><?php echo $f[0].$c[0]; ?></h1></td>
<td></td>
<td style="font-size:0.9em;line-height:10px;"><?php if(DISPLAY_PRICE_WITH_TAX == 'true'){echo INC_TAX;}else{echo EX_TAX;}?></td>
</tr>
<tr><td colspan="3"><div class="black_dots"></div></td></tr>
<tr>
<td><?php $qty = get_post_custom_values('Quantity_'); ?><?php if($qty[0] > 0 ){echo '<div style="font-weight:bold;" class="stokta var">'.IN_STOCK.'</div>';}else{echo '<div class="stokta yok">'.OUT_OF_STOCK.'</div>';} ?></td>
<td></td>
<td><?php $sku = get_post_custom_values('SKU_'); echo SKU.' '.$sku[0]; ?></td>
</tr>
<tr><td colspan="3"><div class="black_dots"></div></td></tr>
</table>
*/
?>
</div></td><td></td><td valign="top">
<?php
/*
<form id="jsonForm2" action="json-echo.php" method="post">
Message: <input type="text" name="message" value="Hello JSON" />
<input name="products_id" type="hidden" id="p_i_d" value="<?php echo get_the_ID(); ?>" />
<input type="submit" value="Echo as JSON" />
</form>
*/
?>
<?php echo tep_draw_form('cart_quantity', tep_href_link('shopping_cart_ajax.php', tep_get_all_get_params(array('ajax_action')) . 'ajax_action=add_product'),'post','id="jsonForm"'); ?>
<input name="products_id" type="hidden" id="p_i_d" value="<?php echo get_the_ID(); ?>" />
<input name="editor_output" type="hidden" id="editor-output" value="" />
<div style="float:right;"><div style="margin: 0px;">
<input name="cart_count" type="hidden" id="cart-count" value="" />
<div class="boxround box">
<div class="product_side">
<input name="quantity" type="hidden" id="quantity" value="1" />
<?php
/*
<p style="text-align:center;"><label for="quantity" style="font-weight:bold;font-size:1.1em;"><?php echo QUANTITY;?></label>&nbsp;</b><select name="quantity" id="quantity">
<?php for($qc=1; $qc<30; $qc++){ ?>
<option value="<?php echo $qc;?>" <?php if($qc===1){echo 'selected="selected"';}?>><?php echo $qc;?></option>
<?php } ?>
</select>
</p>
*/
?>
<p style="text-align:center;">
<?php
$plugins = get_option('active_plugins');
$required_plugin = 'vote-it-up/voteitup.php';
$debug_queries_on = FALSE;
if ($current_user->ID === 0){ $user_ID = md5($_SERVER['REMOTE_ADDR']); }else{ $user_ID = $current_user->ID; }
$debug_queries_on = TRUE; // Example for yes, it's active
if ( in_array( $required_plugin , $plugins ) ) { ?>
<div class="voting<?php echo get_the_ID(); ?>" id="promo-<?php echo get_the_ID(); ?>" style="text-align:center;"><span style="" id="votecount<?php echo get_the_ID(); ?>"><?php echo GetVotes(get_the_ID());?></span><!---->
<?php if(!UserVoted(get_the_ID(),$user_ID)) { ?>
<a id="votelink<?php the_ID(); ?>" class="status promote" style="color:#000;" href="javascript:vote('votecount<?php the_ID(); ?>','voteid<?php the_ID(); ?>','<?php echo get_option('voteiu_aftervotetext'); ?>',<?php the_ID(); ?>,<?php echo $current_user->ID; ?>,'<?php echo VoteItUp_ExtPath(); ?>');"><?php _e('Like'); ?></a>
<?php }else{ ?>
<span id="likes" style="color:#777;">Likes</span>
<?php } ?>
</div>
<?php } ?>
</p>
</div>
</div>
</div></div></td>
</tr>
</table>
<?php } ?>
<?php /*the_content();*/ ?><div style="margin:0 0 12px 0 ;"></div>
<?php //if( 'product' == $post->post_type ){ echo '<h2><a href="' . tep_href_link(FILENAME_SHOPPING_CART, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $post->ID ).'">'._('Add to Cart').'</a></h2>'; } ?>
<?php /* wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyeleven' ), 'after' => '</div>' ) ); */ ?>
</div><!-- .entry-content -->
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
<?php
/*
<div id="entry-author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 60 ) ); ?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( esc_attr__( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyeleven' ), get_the_author() ); ?>
</a>
</div><!-- #author-link -->
</div><!-- #author-description -->
</div><!-- #entry-author-info -->
*/
?>
<?php endif; ?>
<?php
/*
<div class="entry-meta">
<?php twentyeleven_posted_on(); ?>
</div><!-- .entry-meta -->
<div class="entry-utility">
<?php twentyeleven_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
*/
?>
</div><!-- #post-## -->
<div id="nav-below" class="navigation">
<div style="float:left;margin-right:8px;" class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyeleven' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyeleven' ) . '</span>' ); ?></div>
</div><!-- #nav-below -->
<div style="margin:0 0 12px 0 ;"></div>
<?php //comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div>
<div class="span4">
<div class="row-fluid">
<!--<h4 class="title">SEÇENEKLERİ BELİRLE VE <strong>SEPETE EKLE</strong></h4>-->
<div class="media post">
<!--SEÇENEKLER -->
<?php
// BOF SPPC Hide attributes from customer groups
$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)get_the_ID() . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 ");
$products_attributes = tep_db_fetch_array($products_attributes_query);
if ($products_attributes['total'] > 0) {
?>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
</tr>
<tr><td class="main" colspan="3"><input id="add_to_cart" name="add_cart" value="Tasarımı ve Seçenekleri Onayla" type="submit" class="btn btn-primary btn-large btn-success" style="width:364px;" /></td></tr>
<?php
$secenek[7] ='<img src="'. get_bloginfo('template_url').'/images/secenek1.jpg" /><br>Lorem Ipsum is simply dummy text of the printing and typesetting industry. the Lorem Ipsum has been the industry\'s standard dummy text ever since the you.' ;
$secenek[11] ='<img src="'. get_bloginfo('template_url').'/images/secenek1.jpg" /><br>Lorem Ipsum is simply dummy text of the printing and typesetting industry. the Lorem Ipsum has been the industry\'s standard dummy text ever since the you.' ;
$secenek[6] ='<img src="'. get_bloginfo('template_url').'/images/secenek1.jpg" /><br>Lorem Ipsum is simply dummy text of the printing and typesetting industry. the Lorem Ipsum has been the industry\'s standard dummy text ever since the you.' ;
$secenek[8] ='<img src="'. get_bloginfo('template_url').'/images/secenek1.jpg" /><br>Lorem Ipsum is simply dummy text of the printing and typesetting industry. the Lorem Ipsum has been the industry\'s standard dummy text ever since the you.' ;
$secenek[10] ='<img src="'. get_bloginfo('template_url').'/images/secenek1.jpg" /><br>Lorem Ipsum is simply dummy text of the printing and typesetting industry. the Lorem Ipsum has been the industry\'s standard dummy text ever since the you.' ;
$secenek[9] ='<img src="'. get_bloginfo('template_url').'/images/secenek1.jpg" /><br>Lorem Ipsum is simply dummy text of the printing and typesetting industry. the Lorem Ipsum has been the industry\'s standard dummy text ever since the you.' ;
$secenek[12] ='<img src="'. get_bloginfo('template_url').'/images/secenek1.jpg" /><br>Lorem Ipsum is simply dummy text of the printing and typesetting industry. the Lorem Ipsum has been the industry\'s standard dummy text ever since the you.' ;
?>
<?php
$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)get_the_ID() . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 order by popt.products_options_id");/* order by popt.products_options_id > selectlerin sıralama düzeni */
while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
$products_options_array = array();
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)get_the_ID() . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 order by pa.options_values_price" );
$list_of_prdcts_attributes_id = '';
$products_options = array(); // makes sure this array is empty again
while ($_products_options = tep_db_fetch_array($products_options_query)) {
$products_options[] = $_products_options;
$list_of_prdcts_attributes_id .= $_products_options['products_attributes_id'].",";
}
if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') {
$select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")";
$pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $customer_group_id . "'");
while ($pag_array = tep_db_fetch_array($pag_query)) {
$cg_attr_prices[] = $pag_array;
}
// substitute options_values_price and prefix for those for the customer group (if available)
if ($customer_group_id != '0' && tep_not_null($cg_attr_prices)) {
for ($n = 0 ; $n < count($products_options); $n++) {
for ($i = 0; $i < count($cg_attr_prices) ; $i++) {
if ($cg_attr_prices[$i]['products_attributes_id'] == $products_options[$n]['products_attributes_id']) {
$products_options[$n]['price_prefix'] = $cg_attr_prices[$i]['price_prefix'];
$products_options[$n]['options_values_price'] = $cg_attr_prices[$i]['options_values_price'];
}
} // end for ($i = 0; $i < count($cg_att_prices) ; $i++)
}
} // end if ($customer_group_id != '0' && (tep_not_null($cg_attr_prices))
} // end if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0')
$products_options_array_price ='';
for ($n = 0 ; $n < count($products_options); $n++) {
$products_options_array[] = array('id' => $products_options[$n]['products_options_values_id'], 'text' => $products_options[$n]['products_options_values_name']);
if ($products_options[$n]['options_values_price'] != '0') {
$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options[$n]['price_prefix'] . $currencies->display_price($c[0], $products_options[$n]['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
}
$products_options_array_price[sizeof($products_options_array)-1] = 'data-price="'. $products_options[$n]['options_values_price'].'"';
$products_options_array_prefix[sizeof($products_options_array)-1] = 'data-prefix="'. $products_options[$n]['price_prefix'].'"';
}
// EOF SPPC attributes mod
if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
} else {
$selected_attribute = false;
}
?>
<tr><!-- onmouseover="return this.onclick()" -->
<td><strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong>
</td><td class="main">(<a href="#" onclick="return hs.htmlExpand(this, { contentId: 'highslide-html', headingText: '<?php echo $products_options_name['products_options_name']; ?>', width: 300 } )"
class="highslide">bilgi</a>)<div class="highslide-maincontent"><?php echo $secenek[$products_options_name['products_options_id']]; ?></div></td>
<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute,' class="subsel"', '', $products_options_array_price, $products_options_array_prefix ); ?></td>
</tr>
<?php
}
?>
<tr>
<td class="main"><h4><span id="total_price"><?php echo $f[0];?></span><span id="spancurrency"><?php echo $c[0]; ?></span></h4></td><td class="main" colspan="3" align="right">
</td>
</tr>
</table>
<?php
}
?>
<!-- SEÇENEKLER -->
</form>
<?php
/*
<a class="pull-left" href="#">
<img class="media-object" src="<?php echo get_bloginfo('template_url');?>/busisky_images/post_img1.jpg" alt="">
</a>
<div class="media-body">
<h5 class="media-heading"><a href="#">Vestibulum in vulputate at</a></h5>
Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</div>
</div>
<div class="media post">
<a class="pull-left" href="#">
<img class="media-object" src="<?php echo get_bloginfo('template_url');?>/busisky_images/post_img3.jpg" alt="">
</a>
<div class="media-body">
<h5 class="media-heading"><a href="#">Fusce condimentum nunc ac nisi</a></h5>
Nulla vel metus scelerisque ante sollicitudin commodo. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</div>
</div>
<div class="media post">
<a class="pull-left" href="#">
<img class="media-object" src="<?php echo get_bloginfo('template_url');?>/busisky_images/post_img2.jpg" alt="">
</a>
<div class="media-body">
<h5 class="media-heading"><a href="#">Donec lacinia congue felis</a></h5>
Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. Nulla vel metus scelerisque ante sollicitudin commodo.
</div>
</div>
</div>
<br/>
<div class="row-fluid">
<div class="span12">
<div class="tabbable myTab">
<ul class="nav nav-tabs" id="myTab">
<li class="active"><a href="#color">Colors and fonts</a></li>
<li><a href="#seo">Seo</a></li>
<li><a href="#template">Dynamic templates</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="color">
<img src="<?php echo get_bloginfo('template_url');?>/busisky_img/goodwaves.png" alt="" class="pull-right" /> Sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.<p>Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptate</p>
</div>
<div class="tab-pane" id="seo">
It has survived not only five centuries galley of type and scrambled.<p>Sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet</p>
</div>
<div class="tab-pane" id="template">
Has survived not only five centuries galley of type and scrambled. Sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.<p>Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.</p>
</div>
</div>
*/
?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid" id="footer-bar">
<div class="row-fluid">
<div class="span3">
<h4>Links</h4>
<ul class="nav">
<li><a href="index.html">Home</a></li>
<li><a href="about.html">Features</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="portfolio.html">Portfolio</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
</div>
<div class="span3">
<h4>Recent Posts</h4>
<div class="post">
<img class="post_img" src="<?php echo get_bloginfo('template_url');?>/busisky_images/post_img1.jpg" alt="">
<a href="#">Etiam adipiscing posuere justo</a><br/>
<span>October 10, 2012</span>
</div>
<div class="post">
<img class="post_img" src="<?php echo get_bloginfo('template_url');?>/busisky_images/post_img2.jpg" alt="">
<a href="#">Maecenas hendrerit neque id ante dictum mattis</a><br/>
<span>October 09, 2012</span>
</div>
<div class="post">
<img class="post_img" src="<?php echo get_bloginfo('template_url');?>/busisky_images/post_img3.jpg" alt="">
<a href="#">Vivamus non neque lacus, et cursus tortor</a><br/>
<span>October 09, 2012</span>
</div>
</div>
<div class="span3">
<h4>About Us</h4>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. the Lorem Ipsum has been the industry's standard dummy text ever since the you.</p>
<br/>
<a href="#"><img src="<?php echo get_bloginfo('template_url');?>/busisky_img/social-facebook.png" alt="Facebook" /></a>
<a href="#"><img src="<?php echo get_bloginfo('template_url');?>/busisky_img/social-twitter.png" alt="Twitter" /></a>
<a href="#"><img src="<?php echo get_bloginfo('template_url');?>/busisky_img/social-rss.png" alt="RSS" /></a>
<a href="#"><img src="<?php echo get_bloginfo('template_url');?>/busisky_img/social-flickr.png" alt="Flickr" /></a>
</div>
<div class="span3">
<h4>Photostream</h4>
<div class="flickr_container">
<script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=6&amp;display=latest&amp;size=s&amp;layout=x&amp;source=user&amp;user=28133529@N03"></script>
</div>
</div>
</div>
</div>
<div class="container-fluid" id="copyright">
<span>Copyright 2013 @ Busisky. All right reserved.</span>
</div>
<script src="<?php echo get_bloginfo('template_url');?>/busisky_js/modernizr.custom.js"></script>
<script src="<?php echo get_bloginfo('template_url');?>/busisky_js/jquery.cslider.js"></script>
<script type="text/javascript">
$(function() {
$('#myTab a:first').tab('show');
$('#myTab a').click(function (e) {
e.preventDefault();
$(this).tab('show');
})
//Menu
$('#menu > ul').superfish({
delay: 100,
animation: {opacity:'show', height:'show'},
speed: 'fast',
autoArrows: true
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment