Jump to content

a064855

Members
  • Posts

    10
  • Joined

  • Last visited

Profile Information

  • Location
    Spain
  • Activity
    Developer

a064855's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I have already done it but i do not know what to interpret from it. I am unexperienced in prestashop. Could you give me a hint? These are the results
  2. Hello. I have deployed my store online http://koalambu.com/ which is a multistore that supports english and spanish languages and everything works as expected except when loading. It takes between 3 and 5 seconds to detect browser language and connect. I have debugged and checked all the code, compressed it but could not get anything. Does anyone know what can it be?
  3. I am new to prestashop and I am trying to make a payment module where I need to duplicate an order for statistical issues. My problem is that the duplicate order also substracts from product stock and I need to know where, after an order validation, does prestashop update stock to avoid calling the corresponding function. In few words, I call validateOrder() twice but I need that StockAvailable be updated once. By the way, I examined the whole validateOrder() function searching for the update section / function but I haven't been able to find it. The only related code that I have been able to find was this: // updates stock in shops if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) { $product_list = $order->getProducts(); foreach ($product_list as $product) { // if the available quantities depends on the physical stock if (StockAvailable::dependsOnStock($product['product_id'])) { // synchronizes StockAvailable::synchronize($product['product_id'], $order->id_shop); } } } but this is only works when advanced stock management is enabled. Thanks.
  4. I fixed the issue doing the following steps: Deleted the root .htaccess. Cleared the smarty cache files under ./cache/smarty/compile Load the mod_rewrite module that was not installed: a2enmod rewrite Added the Allowoverride All directive to /etc/apache2/apache2.conf <Directory /var/www/prestashop/> Options Indexes FollowSymLinks AllowOverride All </Directory>
  5. I deployed the store to amazon via git, and i did delete the smarty cache files and deleted the .htaccess. I later discovered that mod_rewrite was not installed and i installed it but it has not worked yet.
  6. I have developed a multilanguage prestashop store completely in localhost using xampp in mac and it works. Both the backoffice and the store (frontoffice). After that, i have deployed it to amazon but there comes my problem. The backoffice works but the store doesn't. The browser just displays an apache 404 page and tells me The requested URL domain/prestashop/en/ was not found on this server. But it does exist. Besides, the backoffice confirms it. Inspecting the error.log I find the following message: [Thu Mar 12 11:12:37 2015] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/prestashop/en For what I see, Apache is treating the language (/en/) as file when it is not. I've searched all across the web and I can't find how to fix it. I know it is a server issue, but somehow can't find the solution. What's the matter here?
  7. I am making a payment gateway and It could happen that depending on the shop manager, taxes maybe already included in the price, or not. So, when included, the tax field would be 0 and I need to get the price value without the tax. I came up with the idea of making a categories tree in the module back office where the shop manager may specify each category tax, so if it's included in the price, I can calculate it looking what category the product belongs to. My problem, I do not know how to display the categories tree in the back office. How can I do it?
  8. I'm new to prestashop and I need to know if there is a way (via code) by which I can restrict the number of payment gateways available according to customer postcode. For example, let's say that anyone who buys from New York can only pay via PayPal but the rest cities in US can use any payment gateway. I tried this, but it disables modules for everyone not for a particular client: if (strcmp($postcode, "12345")) // postcode I want to restrict { // disabling other payment modules $modules = PaymentModuleCore::getInstalledPaymentModules(); foreach ($modules as $module) { // fetch all installed module names $name = $module['name']; if (strcmp($name, "Paypal") != 0) Module::getInstanceByName($name)->disable(); } }
  9. I'm new to prestashop and I need to know if there is a way (via code) by which I can restrict the number of payment gateways available according to customer postcode. For example, let's say that anyone who buys from New York can only pay via PayPal but the rest cities in US can use any payment gateway. I tried this, but it disables modules for everyone not for a particular client: if (strcmp($postcode, "12345")) // postcode I want to restrict { // disabling other payment modules $modules = PaymentModuleCore::getInstalledPaymentModules(); foreach ($modules as $module) { // fetch all installed module names $name = $module['name']; if (strcmp($name, "Paypal") != 0) Module::getInstanceByName($name)->disable(); } }
×
×
  • Create New...