Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OllaCart Point of Sale for osCommerce - ocPOS


Guest
 Share

Recommended Posts

@@jcall

 

 
I Have a question ...

I enabled QTP is all working well ... but ...

If I Have such Product name: Shoe ($ 10) with Attribute: Red (+ $ 2) and yellow (+ $ 5) and add the product first:

Shoe + Red ($ 10 + $ 2) = $ 12

If you then add:

Shoe + Yellow ($ 10 + $ 5) I do not Have new product with new price ($ 15) but the system   add 1 unit on Previous product.

Be installation error? or The system does not take into consideration the equal products but with different attributes ???
 
excellent Contributions
Thanks for sharing and for the possible answer.
Edited by rainton
Link to comment
Share on other sites

That appears to be a bug in 2.5. I do not believe that 2.1 has that bug. I just haven't had the time to squash it in 2.5 yet.

 

I had thought that issue only appeared in OSC mode (as documented in README.txt). Apparently not. <sigh>

Edited by jcall
Link to comment
Share on other sites

@@jcall

 

Yes, I confirm the bug ... is for all conditions attribute.

I'll try to fix it ... if successful post the solution.

I think that in AddItem function, missing all part of recognizing whether the product with the same code and id have different attributes.

If you have suggestions please tell me

I hope to solve
I will update

Link to comment
Share on other sites

@@jcall

 

half-tested solution

In: includes / functions.php

Search:

                $this->Items[$ this->NextItemIndex]['ProductID'] = $R_Product['products_id'];

Replace with:

                //$this->Items[$this->NextItemIndex]['ProductID'] = $R_Product['products_id'];
                if ($attribute_str){
                $this->Items[$this->NextItemIndex]['ProductID'] = $R_Product['products_id'].'_'. $attribute_str; // rainton
                } else {
                $this->Items[$this->NextItemIndex]['ProductID'] = $R_Product['products_id'];
                }

(Have add $attribute_str for have different id for different attrib)

but this solution has several questions to answer:

1) Changing Product ID, you have to check area Returns
2) Even if the product does not have attributes equal amount but add new product (although seeing many receipts you all have separate products)
3) It should be tested for airport stock

I still check is try to give answers.

Edited by rainton
Link to comment
Share on other sites

...continue...

 

In: includes/attributes.php

 

Search:

      $Q_stock = mysql_query("SELECT * from ".PRODUCTS_STOCK." where products_id=".$this->products_id );

 

Add before:

      $explodeID = explode("_",$this->products_id); //rainton
      $this->products_id = $explodeID[0];

Otherwise the system does not update quantity in products_stock

Link to comment
Share on other sites

Try setting OSC_ATTRIBUTES_MODE to NONE.

 

-jared

that is what it's set to standard...

 

and since it complains about QT Pro i set it to OSC also

Link to comment
Share on other sites

can anyone tell me how i can add a parameter to the Orders In-Progress list

 

What I mean is the Orders In-Progress stores the customer date time firstname lastname and total I would also like to store another field from the customers table along with the above so when selected from the list this variable is included.

 

(I am in the progress of getting SPPC with QTY price breaks working) and have it mostly working (in a hacked way)

 

thanks in advance

Link to comment
Share on other sites

  • 2 months later...

Harvey,

 

This is a feature not (yet?) included in ocPOS. I realize that it's a pain, but I just never got time to update the pricing functions to have an option to include VAT in pricing versus list VAT separately.

 

-jared

Link to comment
Share on other sites

  • 4 weeks later...

I already have ollacart installed and have been using it for a few years, does anyone know where I can remove the need for the server key instead of installing it afresh. I want to keep it it as I have it. I cant see in the download where the changes need to be. any help would be fab but I need to do it before 21 Nov as that when the server is offline (I missed the email) Thanks Emma

Link to comment
Share on other sites

Hello everybody,

 

I am using the OllaCart Point of Sale system on one of my websites, and I am trying to set up PayPal PRO with it. 

 

I am wondering if anybody has done this before, and might be able to show/send the code that you have used to make this work? 

 

Thanks in advance,

Justin

Link to comment
Share on other sites

I was pointed this way for support, I am trying to get this setup on Zencart to use which would seem fairly easy...

 

I can't get past Required database tables not found. Please verify the database settings in includes/db.php. If the database tables have prefixes, set the prefix in includes/db_tables.php

 

I have modified db.php with the same user name, db name, password, and server name as my ZenCart settings.  I can login to MyPHP Admin with the same settings.  I have also configured the database prefix since all of mine are zen_ .

 

I also went into db_tables and added the prefix but that didn't help either.

 

Something obvious I'm missing?

Link to comment
Share on other sites

Lol, I'm sometimes to impatient for my own good.   So I started digging in and stepping through the different files, after I did more work than needed I started over and started reading through the install.php.  Checked to make sure files were all there that it was looking for, then came across the test table statement.  I modded the statement to include the zen_ prefix, saved and the installer worked, except everything doubled to zen_zen_ since I added the prefix to db.php and db_tables in my fiddling around.  So I cleaned that up and started clean.

 

So for those trying to get this working on Zen it still works.

Link to comment
Share on other sites

And I'm back.....

 

Has anyone had experience with EPN and getting Autorize.net setup?  EPN somehow emulates the Authorize.net transaction for Zencart.  I've gone through and configured my ID, trans key, and am using EPN's link provided here - https://www.eprocessingnetwork.com/developers.html

 

When I submit a card, I get This site says - Processing Error.  I can't seem to get by that right now.

Link to comment
Share on other sites

Harvey,

 

This is a feature not (yet?) included in ocPOS. I realize that it's a pain, but I just never got time to update the pricing functions to have an option to include VAT in pricing versus list VAT separately.

 

-jared

 

I have rewritten the function to get tax rates. I have tested it on my installation and it works. If someone else could test it and report back that would be great.

 

 

 

First of all BACKUP!! BACKUP!! BACKUP!!

 

Then open /includes/db_tables.php in your POS folder and add the following line before the closing ?>

define('GEO_ZONES', $table_prefix . 'geo_zones');

Then open includes/functions.php in your POS folder and find the GetTax function (around line 284 in version 2.5)

 

Delete or comment out these lines

function GetTax($product_id) {

# This function needs to return a product's tax rate(s) and description(s).
# For tax totaling reasons (think HST/GST/PST), we need to return an array
#   with each tax_rates.tax_rate and tax_rates.tax_description that apply to this product
#   sort taxes by priority

    $store_zone_id = GetStoreZoneID();

    if ($product_id > 1000000000) {
        $tax_lookup_sql = "SELECT tr.tax_rate, tr.tax_description, tax_priority
                 FROM " . TAX_RATES . " tr
                 JOIN " . ZONES_TO_GEO_ZONES . " z2g on z2g.geo_zone_id=tr.tax_zone_id
                 JOIN " . ZONES . " z on z.zone_id=z2g.zone_id
                 WHERE z.zone_id = '" . $store_zone_id . "'
                 ORDER BY tax_priority ASC";
    } else {
        $tax_lookup_sql = "SELECT tr.tax_rate, tr.tax_description, tax_priority
                 FROM " . PRODUCTS . " p
                 JOIN " . TAX_RATES . " tr on p.products_tax_class_id=tr.tax_class_id
                 JOIN " . ZONES_TO_GEO_ZONES . " z2g on z2g.geo_zone_id=tr.tax_zone_id
                 JOIN " . ZONES . " z on z.zone_id=z2g.zone_id
                 WHERE z.zone_id = '" . $store_zone_id . "' and p.products_id = '" . $product_id . "'
                 ORDER BY tax_priority ASC";
    }

    $tax_lookup_query = oc_query($tax_lookup_sql, 'SQL Error. Tax detail lookup failure.');

    $i = 0;
    $tax_array = array();

    while ($tax_lookup_result = mysql_fetch_array($tax_lookup_query)) {
        $tax_array[$i]['tax_description'] = $tax_lookup_result['tax_description'];
        $tax_array[$i]['tax_rate'] = $tax_lookup_result['tax_rate'];
        $tax_array[$i]['tax_priority'] = $tax_lookup_result['tax_priority'];
        // $tax_array[$i]['tax_total'] = 0;
        $i++;
    }

    return $tax_array;
}

// end function GetTax

and replace with these lines:

//Function GetTax
function GetTax($product_id) {

# This function needs to return a product's tax rate(s) and description(s).
# For tax totaling reasons (think HST/GST/PST), we need to return an array
#   with each tax_rates.tax_rate and tax_rates.tax_description that apply to this product
#

	$store_zone_id = GetStoreZoneID();
	$country_query_sql = "select zone_country_id from " . ZONES . " where zone_id = '" . $store_zone_id . "'";
	$country_id_query = mysql_query($country_query_sql);
	$country_id_result = mysql_fetch_array($country_id_query);
	$country_id = $country_id_result['zone_country_id'];

    if ($product_id > 1000000000) {
		$tax_lookup_sql = "select SUM(tax_rate) as tax_rate, tr.tax_priority, tr.tax_description from " . TAX_RATES . " tr left join " . ZONES_TO_GEO_ZONES . " za ON tr.tax_zone_id = za.geo_zone_id left join " . GEO_ZONES . " z ON z.geo_zone_id = tr.tax_zone_id WHERE (za.zone_country_id IS NULL OR za.zone_country_id = '0' OR za.zone_country_id = '" . (int)$country_id . "') AND (za.zone_id IS NULL OR za.zone_id = '0' OR za.zone_id = '" . (int)$store_id . "') GROUP BY tr.tax_priority";
    } else {
		$tax_lookup_sql = "select SUM(tax_rate) as tax_rate, tr.tax_priority, tr.tax_description from " . TAX_RATES . " tr left join " . PRODUCTS . " p on p.products_tax_class_id = tr.tax_class_id left join " . ZONES_TO_GEO_ZONES . " za ON tr.tax_zone_id = za.geo_zone_id left join " . GEO_ZONES . " z ON z.geo_zone_id = tr.tax_zone_id WHERE (za.zone_country_id IS NULL OR za.zone_country_id = '0' OR za.zone_country_id = '" . (int)$country_id . "') AND (za.zone_id IS NULL OR za.zone_id = '0' OR za.zone_id = '" . (int)$store_id . "') and p.products_id = '" . $product_id . "' GROUP BY tr.tax_priority";
  
		
    }
    
	$tax_lookup_query = mysql_query($tax_lookup_sql) or die ("SQL Error. Tax detail lookup failure.  <br><br>SQL = $tax_lookup_sql");
    
    $i = 0;
    $tax_array = array();
    while ($tax_lookup_result = mysql_fetch_array($tax_lookup_query)) {
        $tax_array[$i]['tax_description'] = $tax_lookup_result['tax_description'];
        $tax_array[$i]['tax_rate'] = $tax_lookup_result['tax_rate'];
		$i++;
    }
	
	
    
    return $tax_array;

}

//end Function GetTax 

Should work with version 2.1 as well.

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...