Jump to content

damonsk

Members
  • Posts

    37
  • Joined

  • Last visited

damonsk's Achievements

Newbie

Newbie (1/14)

5

Reputation

  1. Any chance Issues on the repos can be enabled? I'm not too keen on the forge, seems overwhelming. Would be nice for it all to be contained within github.
  2. Do you have this setup on a dev / test server that I could view? Also are the 404's generated by language urls (url.com/it/search) or limited to say just your english version (url.com/search). I can see the rule is present for url.com/search but not for specific languages url.com/it/search.
  3. Can you copy and paste the generated htaccess and tools::generateHtaccess function and I'll see if I can spot anything.
  4. You would amend rules outside the if($multilang) condition. The rules within the if($multilang) condition would need to remain as is so they load the correct language. This won't have any impact on loading speeds. if ($multilang) { // DO NOT CHANGE THESE $tab['RewriteRule']['content']['^([a-z]{2})/[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html'] = 'product.php?id_product=$2&isolang=$1 [QSA,L]'; $tab['RewriteRule']['content']['^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]*\.html'] = 'product.php?id_product=$2&isolang=$1 [QSA,L]'; $tab['RewriteRule']['content']['^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]*(/[a-zA-Z0-9-]*)+'] = 'category.php?id_category=$2&isolang=$1&noredirect=1 [QSA,L]'; $tab['RewriteRule']['content']['^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]*'] = 'category.php?id_category=$2&isolang=$1 [QSA,L]'; $tab['RewriteRule']['content']['^([a-z]{2})/content/([0-9]+)\-[a-zA-Z0-9-]*'] = 'cms.php?isolang=$1&id_cms=$2 [QSA,L]'; $tab['RewriteRule']['content']['^([a-z]{2})/content/category/([0-9]+)\-[a-zA-Z0-9-]*'] = 'cms.php?isolang=$1&id_cms_category=$2 [QSA,L]'; $tab['RewriteRule']['content']['^([a-z]{2})/([0-9]+)__[a-zA-Z0-9-]*'] = 'supplier.php?isolang=$1&id_supplier=$2 [QSA,L]'; $tab['RewriteRule']['content']['^([a-z]{2})/([0-9]+)_[a-zA-Z0-9-]*'] = 'manufacturer.php?isolang=$1&id_manufacturer=$2 [QSA,L]'; } // PS BASE URI automaticaly prepend the string, do not use PS defines for the image directories $tab['RewriteRule']['content']['^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$'] = 'img/c/$1$2.jpg [L]'; $tab['RewriteRule']['content']['^([0-9]+)\-[a-zA-Z0-9-]*\.html'] = 'product.php?id_product=$1&isolang=en [QSA,L]'; $tab['RewriteRule']['content']['^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html'] = 'product.php?id_product=$1&isolang=en [QSA,L]'; // Notice : the id_category rule has to be after product rules. // If not, category with number in their name will result a bug $tab['RewriteRule']['content']['^([0-9]+)\-[a-zA-Z0-9-]*(/[a-zA-Z0-9-]*)+'] = 'category.php?id_category=$1&noredirect=1&isolang=en [QSA,L]'; $tab['RewriteRule']['content']['^([0-9]+)\-[a-zA-Z0-9-]*'] = 'category.php?id_category=$1&isolang=en [QSA,L]'; $tab['RewriteRule']['content']['^([0-9]+)__([a-zA-Z0-9-]*)'] = 'supplier.php?id_supplier=$1&isolang=en [QSA,L]'; $tab['RewriteRule']['content']['^([0-9]+)_([a-zA-Z0-9-]*)'] = 'manufacturer.php?id_manufacturer=$1&isolang=en [QSA,L]'; $tab['RewriteRule']['content']['^content/([0-9]+)\-([a-zA-Z0-9-]*)'] = 'cms.php?id_cms=$1&isolang=en [QSA,L]'; $tab['RewriteRule']['content']['^content/category/([0-9]+)\-([a-zA-Z0-9-]*)'] = 'cms.php?id_cms_category=$1&isolang=en [QSA,L]'; // Compatibility with the old URLs Notice the &isolang=en appended to the urls above.
  5. This should be possible. Hopefully Agile PayPal would extend PaymentModule therefore you would have to override PaymentModule with some custom code to make this happen. You would have to override the validateOrder function.
  6. You may have to regenerate the htaccess once you modify tools class. The problem here is when you visit the site intiially your set to the default language - english. When you navigate away to a url with the isocode for italy the language in your cookie is updated. So if you visit a site without the language set within the url it will just load from your cookie. If you see there is a test to see if your shop is using languages - if($multilang) . This then creates new urls for each language. What needs to be done or added into your htaccess is urls without the language set but actually set on the rewrite rule. $tab['RewriteRule']['content']['^([a-z]{2})/[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html'] = 'product.php?id_product=$2&isolang=$1 [QSA,L]'; You can see the first part of the rule is ([a-z]{2})/ this is the iso language code. This is then accepted as the $1 parameter in the product.php?id_product=$2&isolang=$1 So what is required is these rules without the first part ([a-z]{2}) but retains the isolang= Example $tab['RewriteRule']['content']['^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html'] = 'product.php?id_product=$1&isolang=en [QSA,L]'; These rules already exists immediately after the if($multilang) condition. So you need to amend these to include the isolang=en querystring.
  7. It's probably been set in the cookie. Modify the generate htaccess in tools and append &isolang=en to the end of the none multilang urls.
  8. Ok I think you will need to override the Link class function getLangLink as well as Tools generateHtaccess since Prestashop is generating URLS with /en/ in them. Are you using 1.5 or 1.4?
  9. You may have to re-generate the htaccess file - this is done in the back office. Either SEO/URLS for 1.5 and Generators in 1.4. Could you copy/paste the generated htaccess file by prestashop and provide an example of what you would like the htaccess to look like. I'll see if I can help more.
  10. Your htaccess file is generated by the Tools class - function generateHtaccess. Check that out see if thats what you are looking for.
  11. Just had a quick look at the module - This stands out to me as a potential cause - The Idealcheckoutideal inherits from the PaymentModule class. Within this class it states. /** * @param int $id_currency : this parameter is optionnal but on 1.5 version of Prestashop, it will be REQUIRED * @return Currency */ public function getCurrency($current_id_currency = null) { Now im not sure at what stage this will get called but checkout the bankwire module and you will see it has some impact there. Your module (ideal) is doing the following. Within the idealcheckoutideal.php file - function __construct() // Only EURO's are allowed! $this->currencies = false; $this->currencies_mode = 'radio'; Try changing it to $this->currencies = true; $this->currencies_mode = 'checkbox'; This is taken from the bankwire module. Uninstall and reinstall the module and see if that has any effect. As a note - looks like this module needs updating to Prestashop 1.5.
  12. Is your module ran within prestashop or are you running it outside - e.g calling the file directly in your browser? I ask because Prestashop handles all the loading of classes. Since you're having to include the Customers class directly leads me to believe you are not running from within prestashop. If that is the case then you should include the prestashop config file - include(dirname(__FILE__).'/../../config/config.inc.php'); You may need to update this path. This should fix your issue.
  13. You could do that and it should work. You would have to rename all instances of sendtoafriend to askaboutproduct. This includes class names and filenames and also the config.xml file. Just a summary - sendtoafriend -- config.xml -- sendtoafriend.php -- sendtoafriend.tpl would become - askaboutproduct -- config.xml -- askaboutproduct.php -- askaboutproduct.tpl Your class (sendtoafriend.php) class sendToAFriend extends Module { .... removed for example ... } would become class askAboutProduct extends Module { .... code removed here ... } This is just scratching the surface, there are many more instances you would have to find and update. You would have to amend the ajax file and update the mail::send call.
  14. I had the same issue. Uninstalled in the back office and reinstalled. This solved the issue for me. I did not reupload.
×
×
  • Create New...