Recent Posts

Pages: [1] 2 3 ... 10
1
General Support / Re: Cookies Slowing My Page
« Last post by berrtus on Today at 10:58:07 PM »
I have solved this with a new index file and the following inserted into .httpaccess:  DirectoryIndex index.html index.php.  At this point there are no tracking cookies on the entire site until a product is clicked on (I still have a few categories with cookies)  So main problem is solved and it speeded up my Yslow score to 92%.  If possible I'll like to eliminate all the cookies.  Again forgive my slow but I am not sure if some cookies are required for the cart.
2
General Support / Cookies Slowing My Page
« Last post by berrtus on Today at 12:51:40 PM »
I am measuring the speed of my site online and I am getting a low score on what is called Yslow. Also it is showing that almost all my images have cookies attached to them, or I am guessing running when they are clicked?  This is giving me a failing score for that category. These images are displayed via an html block on the home page.  I am not sure how the cookies got attached to them.  Can this be eliminated?  I prefer zero cookies as I regard them as exceptionally unethical (in most cases and in the way they are delivered)  I understand many people really like them.  FYI they are being used in reputation management systems.  I did optimize my images, but forgive me for being slow here but i don't think that could attach a cookie right?  So to sum up is there any way(s) to eliminate some or all cookies in AbanteCart?
3
Development Help Needed / error 500
« Last post by Diogo Borralho on Today at 11:26:10 AM »
iam getting 500 error code when i try to finish the cart. i have these error in the log :
"2020-01-23 15:52:18 - App Warning: AbanteCart core v.1.2.15 Resize image error. File: /home/lojaesperanca/public_html/image/no_image.jpg. Try to increase memory limit for PHP or decrease image size. in /home/lojaesperanca/public_html/storefront/model/tool/image.php on line 53
2020-01-23 15:52:22 - error: AbanteCart core v.1.2.15 Allowed memory size of 6291456 bytes exhausted (tried to allocate 8192 bytes) in <b>/home/lojaesperanca/public_html/core/lib/image.php</b> on line <b>127</b>"
can some one help me?
4
call contact support
5
AbanteCart v2.0 / Changeable Invoice Date
« Last post by DarkTitan on Today at 05:23:01 AM »
Please allow the Invoice Date to be changeable.

The invoice date should reflect the date the item becomes the property of the customer. Certainly only after payment and occasionally only at time of delivery.

This would be helpful where a store item is either purposefully made to order, perhaps because of customisation, or where a store allows orders to be placed for items that are out of stock and there is a delay from the supplier.

eg..
  • Day 1 - Order placed
  • Day 4 - Payment received, order is processed and customisation begins
  • Day 7 - Customisation completed, item is shipped

The invoice date should be editable to reflect whichever day is appropriate, based on the item, store policy etc.

I hope is something you can consider :)

6
Templates / Re: Lack of Themes
« Last post by JustSp3cial on January 22, 2020, 11:47:32 AM »
I totally agree with you,
AbanteCart have very robust functionalities, but the theme needed to be updated most especially the  front store
7
General Discussion / Re: AbanteCart crash
« Last post by Lewis-H on January 22, 2020, 11:05:44 AM »
Use this code this will help you!

*/
// Real path (operating system web root) to the directory where abantecart is installed
$root_path = dirname(__FILE__);
if (defined('IS_WINDOWS')) {
      $root_path = str_replace('\\', '/', $root_path);
}
define('DIR_ROOT', $root_path);

// HTTP
$dirname = rtrim(dirname($_SERVER['PHP_SELF']), '/.\\');
$dirname = strip_tags(html_entity_decode($dirname,ENT_QUOTES,'UTF-8'));
define('HTTP_SERVER', 'http://' . $_SERVER['HTTP_HOST'] . $dirname);
define('HTTP_ABANTECART', 'http://' . $_SERVER['HTTP_HOST'] . trim($dirname,'static_pages'));

// DIR
define('DIR_APP_SECTION', str_replace('\'', '/', realpath(dirname(__FILE__))) . '/');
define('DIR_CORE', str_replace('\'', '/', realpath(dirname(__FILE__) . '/../')) . '/core/');
define('DIR_ABANTECART', str_replace('\'', '/', realpath(DIR_APP_SECTION . '../')) . '/');

// Startup
require_once(DIR_ABANTECART . 'system/config.php');
// New Installation? Redirect to install
if (!defined('DB_DATABASE')) {
   header('Location: ../install/index.php');
   exit;
}

//check if this is admin and show option to report this issue
$from_admin = false;
$session_id = '';
if(isset($_GET['mode']) && $_GET['mode'] == 'admin') {
   $from_admin = true;
}
foreach(array_keys($_COOKIE) as $key) {
   if ( $from_admin === true && preg_match("/^AC_CP/", $key) ) {
      $session_id = $key;
      break;
   }
   if ( $from_admin !== true && preg_match("/^AC_SF/", $key) ) {
      $session_id = $key;
      break;
   }
}
define('SESSION_ID', $session_id);

//try to start session.
require_once(DIR_CORE . 'lib/session.php');
$session = new ASession(SESSION_ID);

$error = 'Please check AbanteCart and webserver error logs for more details. You can check error log in the control panel if it is functional. Otherwise, refer to error log located on your web server';
if($session && isset($session->data['exception_msg']) && $session->data['exception_msg']){
   $error = $session->data['exception_msg'];
   $session->data['exception_msg'] = '';
}

if($from_admin){
   $subject = rawurlencode("AbanteCart Crash Report " . UNIQUE_ID);
   $pos = -2;
   $t ='';
   $count = 0;
   $log_contents_end = "Log file tail: \n\n";
   $log_handle = fopen(DIR_ABANTECART . "system/logs/error.txt", "r");
   //read 100 lines backwards from the eof or less
   $max_lines = 100;
   $max_bytes = filesize(DIR_ABANTECART . "system/logs/error.txt");
   $lines = array();
   while ($count < $max_lines) {
      //read one line back
      while ($t != "\n") {
          if(abs($pos) >= $max_bytes){
             break;
          }
          fseek($log_handle, $pos, SEEK_END);
          $t = fgetc($log_handle);
          $pos = $pos - 1;
      }
      $lines[] = fgets($log_handle);
      $count++;
      $t='';
   }
   fclose ($log_handle);
   
   $body = rawurlencode($log_contents_end . implode("", array_reverse($lines)) );
}

?>
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<html xmlns=" dir="ltr" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>AbanteCart - Error</title>
<link rel="stylesheet" type="text/css" href="view/stylesheet/stylesheet.css" />
</head>
<body>
<div id="container">
  <div id="header"><img src="view/image/logo.png" alt="AbanteCart" title="AbanteCart" /></div>
  <div id="content">
    <div id="content_top"></div>
    <div id="content_middle">
   <h1 class="error">There has been a critical error processing your request</h1>
   <div style="width: 100%; display: inline-block;">
      <?php echo $error; ?>
   </div>
   <br><br>
   <center>
<?php
   if($from_admin){
?>
      <div style="font-size: 16px;">
         <b><a href="mailto:help@abantecart.com?subject=<?php echo $subject ?>&body=<?php echo $body ?>">Report this problem to AbanteCart team (do not change email subject)</a></b>
      </div>
      <br><br>
<?php
   }
?>   
      <div>
         <b>Check AbanteCart Troubleshooting Guide</a></b>
      </div>
      <br><br>
      <div>
         <b>Need help? Contact for support</a></b>
      </div>

      <br><br>
      <div>
         <a href="<?php echo HTTP_ABANTECART; ?>">Go to main page</a>
      </div>
   </center>
    </div>
    <div id="content_bottom"></div>
  </div>
  <div id="footer"><a onclick="window.open(';">Project Homepage</a>|<a onclick="window.open();">Documentation</a>|<a onclick="window.open;">Support Forums</a>|<a onclick="window.open;">Marketplace</a></div>
</div>
</body>
</html>
8
Marketing / Re: Ideas how to promote the project
« Last post by Lewis-H on January 22, 2020, 11:00:40 AM »
Can you please describe more about the project, so that I can come up with some solution.
Regards,
Lewis
9
Tips and Tricks / Re: How to use a test site?
« Last post by panya.p on January 22, 2020, 02:00:48 AM »
 :) :) :) :) :) :)
10
Development Help Needed / Re: Create next preview button
« Last post by maulik 1intl on January 21, 2020, 11:42:04 AM »
You will need to edit core code to get this. Better option is to make an extension

But try this if it works for you because I think you have some custom code already:

https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/controller/pages/product/product.php#L750

if(isset($category_info) && count($category_info) > 0){
         $nextPrevProducts =  $this->model_catalog_product->getProductNextPrevProducts($product_id, $category_info['category_id']);
         $this->data['nextPrevProducts'] = $nextPrevProducts;
      }

right above foreach ($results as $result) {

-----
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/model/catalog/product.php

Add this before last } line

public function getProductNextPrevProducts($productId, $categoryId){
      $sql = "SELECT * FROM " . $this->db->table("products_to_categories") . " WHERE `category_id` = $categoryId and product_id in ( select product_id from " . $this->db->table("products") . " where STATUS = 1)";
      $query = $this->db->query($sql);
      $product_data =  $query->rows;
      $nextPrevProduct = array();
      if(count($product_data) > 0){
         foreach($product_data as $k => $v){
            if($v['product_id'] == $productId){
               $preProductId = isset($product_data[$k - 1]['product_id']) ? $product_data[$k - 1]['product_id'] : 0;
               $nextProductId = isset($product_data[$k + 1]['product_id']) ? $product_data[$k + 1]['product_id'] : 0;
               $cateSql = "SELECT keyword FROM `url_aliases` WHERE `query` LIKE 'category_id=$categoryId'";
               $cateSqlQuery = $this->db->query($cateSql);
               $cateURL =  count($cateSqlQuery->rows) > 0 ? $cateSqlQuery->row['keyword']: '';
               
               $prevProductSql = "SELECT keyword FROM `url_aliases` WHERE `query` LIKE 'product_id=$preProductId'";
               $prevProductSqlQuery = $this->db->query($prevProductSql);
                 $prevProductURL =  count($prevProductSqlQuery->rows) > 0 ? $prevProductSqlQuery->row['keyword']: '';
               
               $nextProductSql = "SELECT keyword FROM `url_aliases` WHERE `query` LIKE 'product_id=$nextProductId'";
               $nextProductSqlQuery = $this->db->query($nextProductSql);
               $nextProductURL =  count($nextProductSqlQuery->rows) > 0 ? $nextProductSqlQuery->row['keyword']: '';
               
               $nextPrevProduct['prev_product'] = (trim($prevProductURL) != '') ? $cateURL . "/" . $prevProductURL : '';
               $nextPrevProduct['next_product'] = (trim($nextProductURL) != '') ? $cateURL . "/" . $nextProductURL : '';
            }
         }
      }
      return $nextPrevProduct;
   }

And last go to product.tpl and add this code where ever you want buttons and style it the way you want.

https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/view/default/template/pages/product/product.tpl#L268

<?php if(is_array($nextPrevProducts)){ ?>   
<div>
   <div style="float: left">
      <?php if(trim($nextPrevProducts['prev_product']) != '') {?>
         <a href="<?php echo trim($nextPrevProducts['prev_product']); ?>" > Previous Product </a>
      <?php } ?>
   </div>
   <div style="float: right">
      <?php if(trim($nextPrevProducts['next_product']) != '') {?>
         <a href="<?php echo trim($nextPrevProducts['next_product']); ?>" > Next Product </a>
      <?php } ?>
   </div>
</div>
<?php } ?>

You can contact AbanteCart developers (they have paid service abantecart.com/contact-us) or some other developers https://www.fiverr.com/nattoben This developer has made few extension for AbanteCart he might be able to help you https://marketplace.abantecart.com/index.php?rt=product/vendor&v=40 

P.S I am not promoting anyone here just trying to help you as what you want is not an easy thing. It needs some custom development
Pages: [1] 2 3 ... 10

Powered by SMFPacks Social Login Mod