Osclass forums
Support forums => Plugins => Plugin Payments => Topic started by: saraivaruas on June 07, 2017, 05:33:19 pm
-
Hello dear, I would like to know if you are on the page oc-content / plugins / payment_pro / user / packs.php
The offered packs are shown vertically
1
2
3
There is some psibility to make it go horizontally
1 2 3.
I have tried but my knowledge limits me. Thanks for the help
this is the code:
<h2><?php echo $credit_msg; ?></h2>
<?php if(count($packs)>0) {
foreach($packs as $pack) { ?>
<table width="250" border="0" align="center" cellpadding="0">
<tr>
<td>
<div align="center" style="background-color: #CCCCCC ">
<div class="payments-item" >
<h2 style="background-color:#FF9900 "><?php printf(__('Credit pack #%s', 'payment_pro'), str_pad($pack['pk_i_id'], 3, "0",STR_PAD_LEFT)); ?></h2>
<div align="left"><h3 style="background-color:#FFCC00 "><?php echo $pack['s_name']; ?></h3></div>
<div align="left"><?php printf(__("Price: %s", 'payment_pro'), osc_format_price($pack['i_amount_cost'], osc_get_preference('currency', 'payment_pro'))); ?></div>
<div align="left"><?php printf(__("Amount rewarded: %s", 'payment_pro'), osc_format_price($pack['i_amount'], payment_pro_currency())); ?></div>
<ul class="payments-ul wallet-ul">
<?php echo '<button class="no-uniform wallet-btn" id="wlt_' . $pack['pk_i_id'] . '" onclick="javascript:addPack(' . $pack['pk_i_id'] . ');">' . __('Buy this pack', 'payment_pro') . '</button>'; ?>
</ul>
</div>
</div>
</td>
</tr>
</table>
-
Hello, no need to post the same question multiple times. Also, use "[ code ]" tags to put your code inside so it's shown nicely
-
Hello _CONEJO thanks for your reply, but the way I put the code just me down as rows and what I need is to the side as column. I have to change in the code? I have tempted everything and it does not work for me
-
Hello _CONEJO thanks for your reply, but the way I put the code just me down as rows and what I need is to the side as column. I have to change in the code? I have tempted everything and it does not work for me
-
I think this is the one that defines
<script type="text/javascript">
function addPack(id) {
$("#wlt_" + id).attr('disabled', true);
$.ajax({
type: "POST",
url: '<?php echo osc_ajax_plugin_url(PAYMENT_PRO_PLUGIN_FOLDER . 'ajax.php'); ?>&wlt=' + id,
dataType: 'json',
success: function(data){
if(data.error==0) {
window.location = '<?php echo osc_route_url('payment-pro-checkout'); ?>';
} else {
$("#wlt_" + id).attr('disabled', false);
var flash = $("#flash_js");
var message = $('<div>').addClass('flashmessage').addClass('flashmessage-error').attr('id', 'flashmessage').html(data.msg);
flash.html(message);
$("#flashmessage").slideDown('slow').delay(3000).slideUp('slow');
$("html, body").animate({ scrollTop: 0 }, "slow");
}
}
});
}
</script>
-
please help me to make a credit packs vertical to horizantal.