Jump to content

Recommended Posts

Posted

My store is at http://www.pdmpantiqueprints.com/store/. When someone goes to buy something, before they've put in their information, under Tax it'll fill in Virginia state sales tax by default.  I believe it's b/c the store is located in VA.  Once you input your info, if you're shipping outside of VA then the tax goes away, which is fine.  However, does anyone know how to make it default to 0?  I believe the following code from /includes/content/cart.inc.php needs editing:

/* START IMPROVED FUNCTIONALITY TO CALC TAX ON STORE LOCALE IF CUSTOMER IS UNKNOWN */

$configCounty = $db->select('SELECT `name`, `abbrev` FROM '.$glob['dbprefix'].'CubeCart_iso_counties WHERE `id` = '.$db->mySQLSafe($config['siteCounty']));

$countyInvName = !empty($cc_session->ccUserData['county']) ? $cc_session->ccUserData['county'] : $configCounty[0]['name'];
$countryInvId = !empty($cc_session->ccUserData['country']) ? $cc_session->ccUserData['country'] : $config['siteCountry'];

$query = 'SELECT `id` FROM '.$glob['dbprefix'].'CubeCart_iso_counties WHERE `name` = '.$db->mySQLSafe($countyInvName).' AND `countryId` = '.$db->MySQLSafe($countryInvId);
$countyInv = $db->select($query);

$countyDelName = !empty($basket['delInf']['county']) ? $basket['delInf']['county'] : $configCounty[0]['name'];
$countyDelAbbr = !empty($basket['delInf']['county']) ? $basket['delInf']['county'] : $configCounty[0]['abbrev'];
$countryDelId = !empty($basket['delInf']['country']) ? $basket['delInf']['country'] : $config['siteCountry'];

$query = 'SELECT `id` FROM '.$glob['dbprefix'].'CubeCart_iso_counties WHERE (`abbrev` = '.$db->MySQLSafe($countyDelAbbr).' OR `name` = '.$db->MySQLSafe($countyDelName).') AND `countryId` = '.$db->MySQLSafe($countryDelId);
$countyDel = $db->select($query);
/* END IMPROVED FUNCTIONALITY TO CALC TAX ON STORE LOCALE IF CUSTOMER IS UNKNOWN */

I tried putting a "/*" towards the beginning to negate the whole block of code, but that caused it to not charge sales tax even after inputting my address as a customer.  I'm running v4 by the way.

Posted

Well, this is quite the coincidence: I just heard back from someone on another forum, after no activity there for a week or two, and it seems to be working.  Please disregard this thread.  I would post the edits he made except I don't know what he did; I gave him two files, and he sent them back to me.

Join the conversation

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

Guest
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.

×
×
  • Create New...