Jump to content

fbas

Members
  • Posts

    36
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

fbas's Achievements

Newbie

Newbie (1/14)

8

Reputation

  1. As much as I hate to modify the code directly and hardcode values, I finally gave in and changed {admin}/tabs/AdminProducts.php to reflect my default (tax rule group 43). version 1.4x - around line 2571 (my line counts are slightly different now because of edits): foreach ($tax_rules_groups AS $tax_rules_group) { $current_rules_group = $this->getFieldValue($obj, 'id_tax_rules_group'); if ($current_rules_group == "") $current_rules_group = 43; // set to default echo '<option value="'.$tax_rules_group['id_tax_rules_group'].'" '.(($current_rules_group == $tax_rules_group['id_tax_rules_group']) ? ' selected="selected"' : '').'>'.Tools::htmlentitiesUTF8($tax_rules_group['name']).'</option>'; } previous code was: foreach ($tax_rules_groups AS $tax_rules_group) echo '<option value="'.$tax_rules_group['id_tax_rules_group'].'" '.(($this->getFieldValue($obj, 'id_tax_rules_group') == $tax_rules_group['id_tax_rules_group']) ? ' selected="selected"' : '').'>'.Tools::htmlentitiesUTF8($tax_rules_group['name']).'</option>';
  2. The Order class (and orders table in db) has a boolean field named 'valid'. The description in the class file is "Order validity (paid and not canceled)" What is the more precise criteria for this field? Items in "back order" status are not being considered valid, and they probably should since they are paid. Thanks, fbas
  3. I notice in the order statuses (Back Office / Orders / Statuses) the default status "Backorder" uses email template "outofstock". I'm not sure, but maybe disabling the email to customer here will work. 9 On backorder outofstock This probably also depends on if you have this checked in the Mail Alerts module: Out of stock: Receive a notification if the quantity of a product is below the alert threshold
  4. I am relatively new, so I wouldn't be comfortable deleting any of the files. To change the display of the sitemap, I believe all you need to do is edit the sitemap.tpl (template file) in your theme directory. if you are using the default theme, it is found in themes/prestashop/sitemap.tpl (.tpl files are like a reduced version of PHP that get run through the Smarty template engine, so if you are comfortable with HTML and PHP you should have no trouble editing it.) --------------------------------------- if you are using the default theme, I do recommend, though, copying the theme to a new directory (i.e. copy themes/prestashop to themes/{new_theme_name}) and making the changes there, then using the prestashop back office to switch to the new theme: click on Preferences and them click Appearance, scroll down to the available themes. The point of this is so that if you upgrade prestashop in the future, your changes in the default theme are not reverted back to the default code.
  5. Also would like an answer since most of my products also fall into a single tax rule and I don't want to accidentally leave it blank.
  6. I've upgraded my server (previously Prestashop 1.4.3) to 1.4.7 and it's still working for me. did you get any noticeable error messages? was your cache cleared/disabled? you might also need to make the "Tax Exempt" group the default group for those users.
  7. In fact, when using guest checkout with 1-page checkout set, for some payment modules, I simply get redirected back to "authentication?back=order.php"
  8. This isn't a solution, it's a workaround. The issue still exists: guest checkout is broken. I have a clean install of 1.4.7, no customizations. When can we find a fix for this? http://forge.prestashop.com/browse/PSCFI-4695
  9. My admins don't like having directories in the HTML tree that are writable by the web server. Clearly several directories need to be writable by the system in order to upload attachments, upload images, update the cache and smarty cache, etc. However, it's a security issue having these writable directories in the HTML directory tree - imagine if someone were able to coax your server into writing an executable file or php file to your writable directories, then do arbitrary things to your server. I was hoping that changing the constants in prestashop/config/defines.inc.php would allow me to move my img directory outside the HTML tree, but in my testing that did not work. It seems these directories must be somewhere in the HTML tree. Is there a way to do this for the img directory? What about the smarty and cache directories? thanks for any help or insight you can provide.
  10. overrided the Cart class, changing getTaxesAverageUsed() and getOrderTotal() to pass NULL address into Product::getPriceStatic() and Tax::getProductEcotaxRate() and Tax::getProductTaxRate() (basically anywhere that $this->{Configuration::get('PS_TAX_ADDRESS_TYPE')} had been used) if the carrier name matches my "in-store pickup" carrier. also altered Tax getProductTaxRate() to set a default $id_state that matches my tax rule. I hope this works and there isn't error or omission on my part. seems to work ok so far.
  11. I still need an answer to this. In store pickups need to ignore the users' invoice and delivery address and use the store's address for Tax purposes. How can I do this?
  12. I hope future releases of prestashop can put some thought into Tax Exempt customers, though maybe it's more complicated than can be solved in a single generalized way.
  13. fbas

    Refund hooks?

    update: I avoided this approach (using cancelProduct hook) and wrote a new admin tab (based on AdminOrder) in a module with a custom refund hook to let store staff specify a refund price. they have to calculate this themselves. kind of disappointing that prestashop has such poor and neglected support for refunds. as I finish up their shipping scheme, I would like to make a more automatic process that uses the cancelProduct hook to as well as my custom refund hook. my approach will be to use cancelProduct to add line items to a table (indicating they are intended to be refunded, all indexed by the current timestamp), then the refund hook will tally up the refund rows with that index (timestamp), calculate shipping refund and add to that table, issue a refund with my payment processor, then mark those rows as refunded.
  14. I couldn't find a way to do this without overriding code. 1) I copied /classes/Tax.php to /override/classes/Tax.php 2) change class definition (line 28) from "class TaxCore extends ObjectModel" to "class Tax extends TaxCore" 3) modify 2 functions, getCarrierTax() AND getProductTaxRate() , to check if address is linked to a user who is placed in a "Tax Exempt" group // put this just inside the "if (!empty($id_address))" block // if $id_address points to a "Tax Exempt" customer, return $0 tax if (is_numeric($id_address)) { $address = new Address((int)($id_address)); // get customer groups to check for tax exempt group $groups = Customer::getGroupsStatic((int)($address->id_customer)); foreach ($groups as $g) { $query = "SELECT name FROM group_lang WHERE id_group=$g AND id_lang=1"; $groupname = Db::getInstance()->getValue($query); if (strtolower(substr($groupname, 0, 10))=="tax exempt") return 0; } } 4) add a group in Back Office named (or at least first 10 characters equal to) "Tax Exempt" in Language 1 (English)* 5) add qualifying customers to Tax Exempt group *note, I hard coded the language to id_lang=1 in the query in the code above. I don't know enough about prestashop to make this more configurable. ** I don't know anything about other taxes (VAT, ecotax) so I didn't change anything there, but you might need to change it for your situation and country. My situation is simple. I only have 1 category of Tax Exempt - they either pay (state) taxes or not. My shop doesn't charge any other taxes (country, etc) so I could safely ignore that.
  15. ahh, the "default" is working, but I still have the problem of wanting to override the user's address and force the tax rule to use the store's local address for in-store pickups.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More