Show Posts


Messages - shahiran12395

Pages: [1] 2 3
1
Support / shipping page
« on: September 09, 2019, 12:57:32 PM »
Hi. I want to ask, i have active self pickup extension but during checkout it skip the shipping pages. is there any requirement to select shipping option because i not set the the self pickup extension selected as default. this for logged user and guest checkout

2
Development Help Needed / Re: price zero issue
« on: August 29, 2019, 03:19:25 AM »
What is the Payment gateway? Is this AbanteCart core extension or 3rd party?

3rd extension..before this it work just fine..for guest and login checkout..but right now only login user cannot checkout item if it is 0.00

Code: [Select]
public function main(){

//init controller data
$this->extensions->hk_InitData($this, __FUNCTION__);

$cart_rt = 'checkout/cart';
$checkout_rt = 'checkout/shipping';
$payment_rt = 'checkout/payment';
$login_rt = 'account/login';
$pmt_address_rt = 'checkout/address/payment';
$shp_address_rt = 'checkout/address/shipping';
$confirm_rt = 'checkout/confirm';
$success_rt = 'checkout/success';
$product_rt = 'product/product';
if ($this->config->get('embed_mode') == true){
$cart_rt = 'r/checkout/cart/embed';
}

if (!$this->cart->hasProducts() || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))){
redirect($this->html->getSecureURL($cart_rt));
}

//validate if order min/max are met
if (!$this->cart->hasMinRequirement() || !$this->cart->hasMaxRequirement()){
redirect($this->html->getSecureURL($cart_rt));
}

if (!$this->customer->isLogged()){
$this->session->data['redirect'] = $this->html->getSecureURL($checkout_rt);

redirect($this->html->getSecureURL($login_rt));
}

if ($this->cart->hasShipping()){
if (!isset($this->session->data['shipping_address_id']) || !$this->session->data['shipping_address_id']){
redirect($this->html->getSecureURL($checkout_rt));
}

if (!isset($this->session->data['shipping_method'])){
redirect($this->html->getSecureURL($checkout_rt));
}
} else{
unset($this->session->data['shipping_address_id']);
unset($this->session->data['shipping_method']);
unset($this->session->data['shipping_methods']);

$this->tax->setZone($this->session->data['country_id'], $this->session->data['zone_id']);

}

if (!isset($this->session->data['payment_address_id']) || !$this->session->data['payment_address_id']){
redirect($this->html->getSecureURL($payment_rt));
}

if (!isset($this->session->data['payment_method'])){
redirect($this->html->getSecureURL($payment_rt));
}

if ($this->request->get['balance'] == 'disapply'){
unset($this->session->data['used_balance'], $this->request->get['balance'], $this->session->data['used_balance_full']);
}
$this->data = array ();

        $this->load->model('checkout/order');
        $date = date("Y-m-d");
        $check_limit = $this->checkTransactionLimit($this->customer->getId(),$date);

        if(!$check_limit['proceed']){
            return redirect($check_limit['url']);
        }

$order = new AOrder($this->registry);
$this->data = $order->buildOrderData($this->session->data);
$order_id = $order->saveOrder();
if ($order_id === false){
// preventing rebuilding order of already processed orders
//(by "back" button via browser history from external payment page(paypal, google_checkout etc))
redirect($this->html->getSecureURL($success_rt));
}
$this->session->data['order_id'] = $order_id;

        $count_card = $this->checkcardnumber($this->data['cardnumber']);

        $this->log->write("car number " .$count_card);
        $this->log->write($this->data['cardnumber']);
        $this->log->write("---------------------------------------");

        if($count_card >= 2){
            return redirect($this->html->getSecureURL('checkout/payment&cclimitusage=1&mode=edit'));
        } else {
            $this->updatecardnumber($this->session->data['order_id'],$this->data['cardnumber']);

        }
        unset($this->data['cardnumber']);

$this->document->setTitle($this->language->get('heading_title'));

$this->document->resetBreadcrumbs();

$this->document->addBreadcrumb(array (
'href'      => $this->html->getHomeURL(),
'text'      => $this->language->get('text_home'),
'separator' => false
));

$this->document->addBreadcrumb(array (
'href'      => $this->html->getSecureURL($cart_rt),
'text'      => $this->language->get('text_basket'),
'separator' => $this->language->get('text_separator')
));

if ($this->cart->hasShipping()){
$this->document->addBreadcrumb(array (
'href'      => $this->html->getSecureURL($checkout_rt),
'text'      => $this->language->get('text_shipping'),
'separator' => $this->language->get('text_separator')
));
}

$this->document->addBreadcrumb(array (
'href'      => $this->html->getSecureURL($payment_rt, '&mode=edit', true),
'text'      => $this->language->get('text_payment'),
'separator' => $this->language->get('text_separator')
));

$this->document->addBreadcrumb(array (
'href'      => $this->html->getSecureURL($confirm_rt),
'text'      => $this->language->get('text_confirm'),
'separator' => $this->language->get('text_separator')
));

$this->data['error_warning'] = $this->error['warning'];
$this->data['success'] = $this->session->data['success'];
if (isset($this->session->data['success'])){
unset($this->session->data['success']);
}

//balance
$balance_def_currency = $this->customer->getBalance();
$balance = $this->currency->convert($balance_def_currency, $this->config->get('config_currency'), $this->session->data['currency']);

if ($balance != 0 || ($balance == 0 && $this->config->get('config_zero_customer_balance')) && (float)$this->session->data['used_balance'] != 0){
$this->data['balance'] = $this->language->get('text_balance_checkout') . ' ' . $this->currency->format($balance, $this->session->data['currency'], 1);
if ((float)$this->session->data['used_balance'] > 0){
$this->data['disapply_balance'] = array ('href' => $this->html->getSecureURL($payment_rt, '&mode=edit&balance=disapply', true),
                                         'text' => $this->language->get('button_disapply_balance'));
$this->data['balance'] .= ' (' . $this->currency->format($balance_def_currency - (float)$this->session->data['used_balance']) . ')';
$this->data['balance'] .= '      ' . $this->currency->format((float)$this->session->data['used_balance']) . ' ' . $this->language->get('text_applied_balance');
} elseif ((float)$this->session->data['used_balance'] == 0 && $balance > 0){
$this->data['disapply_balance'] = array ('href' => $this->html->getSecureURL($payment_rt, '&mode=edit&balance=apply', true),
                                         'text' => $this->language->get('button_apply_balance'));
}
}

$this->loadModel('account/address');
$shipping_address = $this->model_account_address->getAddress($this->session->data['shipping_address_id']);
if ($this->cart->hasShipping()){
$this->data['shipping_address'] = $this->customer->getFormattedAddress($shipping_address, $shipping_address['address_format']);
} else{
$this->data['shipping_address'] = '';
}

$this->data['shipping_method'] = $this->session->data['shipping_method']['title'];
$this->data['shipping_method_price'] = $this->session->data['shipping_method']['title'];
$this->data['checkout_shipping_edit'] = $this->html->getSecureURL($checkout_rt, '&mode=edit', true);
$this->data['checkout_shipping_address'] = $this->html->getSecureURL($shp_address_rt);

$payment_address = $this->model_account_address->getAddress($this->session->data['payment_address_id']);
if ($payment_address){
$this->data['payment_address'] = $this->customer->getFormattedAddress($payment_address, $payment_address['address_format']);
} else{
$this->data['payment_address'] = '';
}
if ($this->session->data['payment_method']['id'] != 'no_payment_required'){
$this->data['payment_method'] = $this->session->data['payment_method']['title'];
} else{
$this->data['payment_method'] = '';
}

$this->data['checkout_payment_edit'] = $this->html->getSecureURL($payment_rt, '&mode=edit', true);
$this->data['checkout_payment_address'] = $this->html->getSecureURL($pmt_address_rt);

$this->loadModel('tool/seo_url');
$this->loadModel('tool/image');

$product_ids = array ();
foreach ($this->data['products'] as $result){
$product_ids[] = (int)$result['product_id'];
}

//get customer product permission
$this->loadModel('catalog/product');
        $this->loadModel('account/customer');
        $cust_info = $this->model_account_customer->getCustomer($this->session->data['customer_id']);

        if ($this->customer->isLogged()){
            $this->checkMemberRank($this->customer->getLoginName(),$product_ids);
            $this->checkWalletBallance($this->customer->getLoginName(),$order_id);

            /*
             * check product restriction for every item added to cart
             * before proceed payment
             */
            $check_products = $this->model_catalog_product->check_purchase_product($product_ids,$cust_info['active_member'],$cust_info['first_buyer']);

            if (!$check_products['proceed']){
                return redirect($this->html->getSecureURL('checkout/cart&new='.$check_products['new'].'&active='.$cust_info['active_member']));
            }
        }



$resource = new AResource('image');
$thumbnails = $resource->getMainThumbList(
'products',
$product_ids,
$this->config->get('config_image_cart_width'),
$this->config->get('config_image_cart_height')
);

        $calculate_st_value_per_day = '';

//Format product data specific for confirmation page
for ($i = 0; $i < sizeof($this->data['products']); $i++){
$product_id = $this->data['products'][$i]['product_id'];
$opts = $this->data['products'][$i]['option'];
$options = array ();
foreach ($opts as $option){
//hide hidden options
if ($option['element_type'] == 'H'){
continue;
}
$title = '';
$value = $option['value'];
// hide binary value for checkbox
if ($option['element_type'] == 'C' && in_array($value, array (0, 1))){
$value = '';
}
// strip long textarea value
if ($option['element_type'] == 'T'){
$title = strip_tags($value);
$title = str_replace('\r\n', "\n", $title);
$value = str_replace('\r\n', "\n", $value);
if (mb_strlen($value) > 64){
$value = mb_substr($value, 0, 64) . '...';
}
}
$options[] = array (
'name'  => $option['name'],
'value' => $value,
'title' => $title
);
}

$this->data['products'][$i]['option'] = $options;

            //get total st ordered
            $total_st_value = $this->model_catalog_product->get_total_st($this->data['products'][$i]['product_id'],$this->data['products'][$i]['quantity']);
            $calculate_st_value_per_day = $this->calculate_st_value($this->session->data['order_id'],$this->session->data['customer_id']);

$thumbnail = $thumbnails[$product_id];
$tax = $this->tax->calcTotalTaxAmount($this->data['products'][$i]['total'], $this->data['products'][$i]['tax_class_id']);
$price = $this->data['products'][$i]['price'];
$qty = $this->data['products'][$i]['quantity'];
$this->data['products'][$i] = array_merge(
$this->data['products'][$i],
array (
'thumb' => $thumbnail,
'tax'   => $this->currency->format($tax),
'price' => $this->currency->format($price),
'total' => $this->currency->format_total($price, $qty),
                            'st_value'   => $total_st_value,
'href'  => $this->html->getSEOURL($product_rt, '&product_id=' . $product_id, true)
));
}

        $this->data['total_order_st_value'] = $calculate_st_value_per_day;
        $this->data['title_st_value'] = 'Total Point:';

$display_totals = $this->cart->buildTotalDisplay();
$this->data['totals'] = $display_totals['total_data'];

$this->data['cart'] = $this->html->getSecureURL($cart_rt);

if ($this->config->get('config_checkout_id')){
$this->loadModel('catalog/content');
$content_info = $this->model_catalog_content->getContent($this->config->get('config_checkout_id'));
if ($content_info){
$this->data['text_accept_agree'] = $this->language->get('text_accept_agree');
$this->data['text_accept_agree_href'] = $this->html->getURL('r/content/content/loadInfo', '&content_id=' . $this->config->get('config_checkout_id'), true);
$this->data['text_accept_agree_href_link'] = $content_info['title'];
} else{
$this->data['text_accept_agree'] = '';
}
} else{
$this->data['text_accept_agree'] = '';
}

if ($this->config->get('coupon_status')){
$this->data['coupon_status'] = $this->config->get('coupon_status');
}

if ($this->session->data['payment_method']['id'] != 'no_payment_required'){
$this->addChild('responses/extension/' . $this->session->data['payment_method']['id'], 'payment');
} else{
$this->addChild('responses/checkout/no_payment', 'payment');
}

$this->view->batchAssign($this->data);
if ($this->config->get('embed_mode') == true){
//load special headers
$this->addChild('responses/embed/head', 'head');
$this->addChild('responses/embed/footer', 'footer');
$this->processTemplate('embed/checkout/confirm.tpl');
} else{
$this->processTemplate('pages/checkout/confirm.tpl');
}

//update data before render
$this->extensions->hk_UpdateData($this, __FUNCTION__);
}

this is the confirm controller code..am i accidentally erase something

3
Development Help Needed / price zero issue
« on: August 28, 2019, 10:59:39 PM »
i have issue on when item is put to 0.00 the button redirect me to payment gateway before this it just go to success checkout. it happen for logged in user checkout only. guest checkout work correctly. which part that i need to double check is it payment or confirm controller?

4
General Support / Re: cart empty when view
« on: August 28, 2019, 10:54:04 PM »
Hi. Last one is 1.2.15

i already upgrade but the problem still the same..cart still empty when user want to checkout using edge browser


try to clear the cache on website, PC and browser. same time.

then try to do the checkout operation again, go to log error file copy and paste the error you have . let's see what is it.

i just using download new abantecart and not change anything the cart still the same auto empty when want to checkout and the abantecart log file not show any error..is my php configuration wrong?

and i cannot create new account..i have attach some screenshot below

5
General Support / Re: cart empty when view
« on: August 28, 2019, 05:34:05 AM »
Hi. Last one is 1.2.15

i already upgrade but the problem still the same..cart still empty when user want to checkout using edge browser

6
Support / disable multiple login
« on: August 26, 2019, 12:48:34 AM »
hi,i wanna ask is this site can disable multiple login for single account?  example if user has logged in to the system using pc web browser they will be auto logged out if he/she logged to other browser or device

7
General Support / Re: cart empty when view
« on: August 25, 2019, 11:12:05 PM »
I suggest to backup and upgrade to latest version

is 1.2.10 is the latest one? i download it using GDrive

8
General Support / Re: cart empty when view
« on: August 23, 2019, 06:03:46 AM »
hi!

What is your abantecart version and what is your recently php version??

Regards

php version is 7.1 and how to check the abantecart version?


go to your website > right click on mouse then down to view page source or click (Ctrol+U). in the header you will see the Abantecart version number.


regards

here the version AbanteCart v1.2.12

9
General Support / Re: cart empty when view
« on: August 23, 2019, 03:12:46 AM »
btw is there any chance my php setting is wrong?

10
General Support / Re: cart empty when view
« on: August 23, 2019, 02:55:11 AM »
Hi.
You can find AbanteCart version in your admin footer right

i cant see on my version  :'(

11
General Support / Re: cart empty when view
« on: August 22, 2019, 08:00:13 PM »
hi!

What is your abantecart version and what is your recently php version??

Regards

php version is 7.1 and how to check the abantecart version?

12
General Support / Re: cart empty when view
« on: August 20, 2019, 03:50:39 AM »
this situation happen if someone using Microsoft edge to access the website. for other web browser works just fine. where can i refer this issues?

13
General Support / cart empty when view
« on: August 19, 2019, 11:29:10 PM »
Hi guys im having trouble with the cart. I already add the item to the cart but when i want to check the checkout/cart page it return an empty cart on certain pc while other pc it run smoothly. there no error listed in my error log so i cant figure out what happen to the item. can anyone advice me on how to fix it?

14
How-to questions / gridunload
« on: August 15, 2019, 12:01:17 AM »
hi. im trying to generate new column to product list table for admin using gridunload but its not working. can advice me on how to do it

Code: [Select]
var text_choose_action = <?php js_echo($text_choose_action); ?>;
var text_select_items = <?php js_echo($text_select_items); ?>;
var _table_id = '<?php echo $data['table_id'?>';
var table_id = '#<?php echo $data['table_id'?>';
var jq_names = [<?php
foreach($data['colNames'] as $col_name){
js_echo($col_name);
echo ',';
}
//echo "'" . implode("','", $data['colNames']) . "'"
?>
];
var jq_model = [<?php
$i 1;
foreach ($data['colModel'] as $m) {
$col = array('resizable: false''title: false''searchoptions: { sopt:[\'cn\'] }');
foreach ($m as $k => $v) {
if (is_string($v)) {
$col[] = "$k: '" addslashes($v) . "'";
} else if (is_int($v)) {
$col[] = "$k: " . (int)($v);
} else if (is_bool($v)) {
$col[] = "$k: " . ($v 'true' 'false');
}
}
echo "{" implode(','$col) . "}";
if ($i count($data['colModel'])) {
echo ',';
$i++;
}
echo "\r\n";
}
?>
];

var gridFirstLoad = true;

var updatePerPage = function(records, limit) {
var html='',
rowList = [<?php echo implode(','$data['rowList']) ?>];
for (var i = 0; i < rowList.length; i++) {
if (records > rowList[i]) {
html += '<option '
+ (rowList[i] == limit ? ' selected="selected" ' : '')
+'value="' + rowList[i] + '">'
+ rowList[i] + '</option>';
}
}
if (records <= 100) {
html += '<option '+ (records == limit ? ' selected="selected" ' : '') +'value="' + records + '"><?php echo $text_all ?></option>';
}
$(table_id + '_pager_center .ui-pg-selbox').html(html);
}

    $(table_id).jqGrid('GridUnload');

15
Templates / Re: product list add new collumn
« on: August 13, 2019, 02:42:30 AM »
sorry. do you have example on how to do it. this is from my product.php

Code: [Select]
$grid_settings['colModel'] = array(
array(
'name' => 'image',
'index' => 'image',
'align' => 'center',
'width' => 65,
'sortable' => false,
'search' => false,
),
array(
'name' => 'name',
'index' => 'name',
'align' => 'center',
'width' => 200,
),
array(
'name' => 'new_column',
'index' => 'new_column',
'align' => 'center',
'width' => 120,
),

Pages: [1] 2 3

Powered by SMFPacks Social Login Mod