Beste leden,
Ik gebruik voor speurtjes.nl een opencart versie.
Nou heb ik een theme geinstalleerd en een aantal modules.
Sommige modules hebben een standaard template die ik niet heb.
Hoe moet ik deze tpl bestand ombouwen naar de mijne.
Als ik in mijn eigen theme kijk en een tpl bestandje pak die al bestaat komen er een aantal errors en word mijn theme vaag.
Zou iemand mij kunnen helpen met het volgende:
winkelwagen die goed staat in thema:
PHP
<div class="box" id="shoppingcart" >
<div class="box-head"><?php echo $heading_title; ?></div>
<div class="box-body">
<div id="module_cart">
<div class="middle">
<?php if ($products) { ?>
<table cellpadding="2" cellspacing="0" style="width: 100%;">
<?php foreach ($products as $product) { ?>
<tr>
<td align="left" valign="top" style="width:1px"><span class="cart_remove" id="remove_<?php echo $product['key']; ?>"> </span></td><td valign="top" align="right" style="width:1px"><?php echo $product['quantity']; ?> x </td>
<td align="left" valign="top"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>
<div>
<?php foreach ($product['option'] as $option) { ?>
- <small style="color: #999;"><?php echo $option['name']; ?> <?php echo $option['value']; ?></small><br />
<?php } ?>
</div></td>
</tr>
<?php } ?>
</table>
<br />
<?php if ($display_price) { ?>
<table cellpadding="0" cellspacing="0" align="right" style="display:inline-block;">
<?php foreach ($totals as $total) { ?>
<tr>
<td align="right"><span class="cart_module_total"><b><?php echo $total['title']; ?></b></span></td>
<td align="right"><span class="cart_module_total"><?php echo $total['text']; ?></span></td>
</tr>
<?php } ?>
</table>
<?php } ?>
<div style="padding-top:5px;text-align:center;clear:both;"><a href="<?php echo $view; ?>"><?php echo $text_view; ?></a> | <a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></div>
<?php } else { ?>
<div style="text-align: center;"><?php echo $text_empty; ?></div>
<?php } ?>
</div>
</div>
</div>
</div>
<?php if ($ajax) { ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/ajax_add.js"></script>
<?php } ?>
<script type="text/javascript"><!--
function getUrlParam(name) {
var name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.href);
if (results == null)
return "";
else
return results[1];
}
$(document).ready(function () {
$('.cart_remove').live('click', function () {
if (!confirm('<?php echo $text_confirm; ?>')) {
return false;
}
$(this).removeClass('cart_remove').addClass('cart_remove_loading');
$.ajax({
type: 'post',
url: 'index.php?route=module/cart/callback',
dataType: 'html',
data: 'remove=' + this.id,
success: function (html) {
$('#module_cart .middle').html(html);
if (getUrlParam('route').indexOf('checkout') != -1) {
window.location.reload();
}
}
});
});
});
//--></script>
Toon Meer
Hier het nieuws aanmeld script die ingebouwd moet worden:
PHP
<div class="box">
<div class="top"><img src="catalog/view/theme/default/image/contact.png" alt="" /><?php echo $heading_title; ?></div>
<div class="middle" style="text-align: center;">
<?php
if($thickbox) { ?>
<a href="#TB_inline?height=300&width=300&inlineId=frm_subscribe" title="Newsletter Subcribe" class="thickbox"> <?php echo($text_subscribe); ?> </a>
<?php } ?>
<div id="frm_subscribe" <?php
if($thickbox) { ?> style="display:none;" <?php } ?>>
<form name="subscribe" id="subscribe" >
<table border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="left"><span class="required">*</span> <?php echo $entry_email; ?><br /><input type="text" value="" name="subscribe_email" id="subscribe_email"></td>
</tr>
<tr>
<td align="left"><?php echo $entry_name; ?> <br /><input type="text" value="" name="subscribe_name" id="subscribe_name"> </td>
</tr>
<?php
for($ns=1;$ns<=$option_fields;$ns++) {
$ns_var= "option_fields".$ns;
?>
<tr>
<td align="left">
<?php
if($$ns_var!=""){
echo($$ns_var." <br/>");
echo('<input type="text" value="" name="option'.$ns.'" id="option'.$ns.'">');
}
?>
</td>
</tr>
<?php
}
?>
<tr>
<td align="left">
<a class="button" onclick="email_subscribe()"><span><?php echo $entry_button; ?></span></a><?php if($option_unsubscribe) { ?>
<a class="button" onclick="email_unsubscribe()"><span><?php echo $entry_unbutton; ?></span></a>
<?php } ?>
</td>
</tr>
<tr>
<td align="center" id="subscribe_result"></td>
</tr>
</table>
</form>
</div>
</div>
<div class="bottom"> </div>
<script language="javascript">
<?php
if(!$thickbox) {
?>
function email_subscribe(){
$.ajax({
type: 'post',
url: 'index.php?route=module/newslettersubscribe/subscribe',
dataType: 'html',
data:$("#subscribe").serialize(),
success: function (html) {
eval(html);
}});
}
function email_unsubscribe(){
$.ajax({
type: 'post',
url: 'index.php?route=module/newslettersubscribe/unsubscribe',
dataType: 'html',
data:$("#subscribe").serialize(),
success: function (html) {
eval(html);
}});
}
<?php }else{ ?>
function email_subscribe(){
$.ajax({
type: 'post',
url: 'index.php?route=module/newslettersubscribe/subscribe',
dataType: 'html',
data:$("#TB_ajaxContent #subscribe").serialize(),
success: function (html) {
eval(html);
}});
}
function email_unsubscribe(){
$.ajax({
type: 'post',
url: 'index.php?route=module/newslettersubscribe/unsubscribe',
dataType: 'html',
data:$("#TB_ajaxContent #subscribe").serialize(),
success: function (html) {
eval(html);
}});
}
<?php } ?>
</script>
</div>
Toon Meer
Als iemand het voor me voor kan doen kan ik wellicht de rest zelf.