Jump to content

sibrodo

Members
  • Posts

    42
  • Joined

  • Last visited

Contact Methods

Profile Information

  • Location
    Melbourne
  • Activity
    Developer

Recent Profile Visitors

332 profile views

sibrodo's Achievements

Newbie

Newbie (1/14)

7

Reputation

  1. Looks like Prestashop 1.6 is terribly buggy. Anyone has a solution for this ?
  2. I had this same problem as well, but i think this might be specific to me only. Anyway, i share my solution: Inside your theme folder, look for : js folder. Example: prestashop_directory/themes/your_theme_folder/js/ Inside this folder, try to look a javascript file called : 'product.js' and open it with your text editor (e.g. Sublime Text). Find the following line: i.e. Hit CTRL + F and search for 'combinationsFromController' function updatePrice() { // Get combination prices var combID = $('#idCombination').val(); var combination = combinationsFromController[combID]; if (typeof combination == 'undefined') return; In my case, the reason that "Add to Cart" button is missing, because i had a javascript error that says : "variable combinationsFormController is not declared". REMEMBER, yours might be different. Try to modify the above code so it looks like this: function updatePrice() { // Get combination prices var combID = $('#idCombination').val(); var combination = combinationsFromController[combID]; typeof combination = 'undefined'; if (typeof combination == 'undefined') return; Notice that i added a new line : typeof combination = 'undefined'; Remember: This is a temporary fix. Add that new only will always set the combination to 'undefined'. Meaning, your product combination will always fail to work. I don't mind with this, since my product does not required any combination. There is also a possibility when you update the qty (i.e. buy more than 1 products or increment the product), it will look as if nothing happen (no response). But actually the product gets added/incremented. The real solution would be to declare this var 'combinationsFromController'. However, i have no idea in which function or where should i declare that. Perhaps anyone knows ? Hope this helps.
  3. I had this same problem as well, but i think this might be specific to me only. Anyway, i share my solution: Inside your theme folder, look for : js folder. Example: prestashop_directory/themes/your_theme_folder/js/ Inside this folder, try to look a javascript file called : 'product.js' and open it with your text editor (e.g. Sublime Text). Find the following line: i.e. Hit CTRL + F and search for 'combinationsFromController' function updatePrice() { // Get combination prices var combID = $('#idCombination').val(); var combination = combinationsFromController[combID]; if (typeof combination == 'undefined') return; In my case, the reason that "Add to Cart" button is missing, because i had a javascript error that says : "variable combinationsFormController is not declared". REMEMBER, yours might be different. Try to modify the above code so it looks like this: function updatePrice() { // Get combination prices var combID = $('#idCombination').val(); var combination = combinationsFromController[combID]; typeof combination = 'undefined'; if (typeof combination == 'undefined') return; Notice that i add a new line : typeof combination = 'undefined'; Remember: This is a temporary fix. Add that new only will always set the combination to 'undefined'. Meaning, your product combination will always fail to work. I don't mind with this, since my product does not required any combination. There is also a possibility when you update the qty (i.e. buy more than 1 products or increment the product), it will look as if nothing happen (no response). But actually the product gets added/incremented. The real solution would be to declare this var 'combinationsFromController'. However, i have no idea in which function or where should i declare that. Perhaps anyone knows ? Hope this helps or at least point you guys to the right direction.
  4. I had this same problem as well, but i think this might be specific to me only. Anyway, i share my solution: Inside your theme folder, look for : js folder. Example: prestashop_directory/themes/your_theme_folder/js/ Inside this folder, try to look a javascript file called : 'product.js' and open it with your text editor (e.g. Sublime Text). Find the following line: i.e. Hit CTRL + F and search for 'combinationsFromController' function updatePrice() { // Get combination prices var combID = $('#idCombination').val(); var combination = combinationsFromController[combID]; if (typeof combination == 'undefined') return;In my case, the reason that "Add to Cart" button is missing, because i had a javascript error that says : "variable combinationsFormController is not declared". REMEMBER, yours might be different. Try to modify the above code so it looks like this: function updatePrice() { // Get combination prices var combID = $('#idCombination').val(); var combination = combinationsFromController[combID]; typeof combination = 'undefined'; if (typeof combination == 'undefined') return;Notice that i add a new line : typeof combination = 'undefined'; Remember: This is a temporary fix. Add that new only will always set the combination to 'undefined'. Meaning, your product combination will always fail to work. I don't mind with this, since my product does not required any combination.The real solution would be to declare this var 'combinationsFromController'. However, i have no idea in which function or where should i declare that. Perhaps anyone knows ? Hope this helps.
  5. I had this same problem as well, but i think this might be specific to me only. Anyway, i share my solution: Inside your theme folder, look for : js folder. Example: prestashop_directory/themes/your_theme_folder/js/ Inside this folder, try to look a javascript file called : 'product.js' and open it with your text editor (e.g. Sublime Text). Find the following line: i.e. Hit CTRL + F and search for 'combinationsFromController' function updatePrice() { // Get combination prices var combID = $('#idCombination').val(); var combination = combinationsFromController[combID]; if (typeof combination == 'undefined') return; In my case, the reason that "Add to Cart" button is missing, because i had a javascript error that says : "variable combinationsFormController is not declared". REMEMBER, yours might be different. Try to modify the above code so it looks like this: function updatePrice() { // Get combination prices var combID = $('#idCombination').val(); var combination = combinationsFromController[combID]; typeof combination = 'undefined'; if (typeof combination == 'undefined') return; Notice that i add a new line : typeof combination = 'undefined'; Remember: This is a temporary fix. Add that new only will always set the combination to 'undefined'. Meaning, your product combination will always fail to work. I don't mind with this, since my product does not required any combination.The real solution would be to declare this var 'combinationsFromController'. However, i have no idea in which function or where should i declare that. Perhaps anyone knows ? Hope this helps.
  6. Hello, I get similar error, can you tell me what did you do to come up with that conclusion ?
  7. Hi, i'd like to know where can i find the exact Table & Column that store the value of this field (please see attachment). See image: http://i.imgur.com/fTbpjWf.png If you are wondering why am i asking this, instead of just set the value from that page that is because i have 1000+ input fields for each state and basically it takes forever to completely render the page. That's why i prefer to set the value directly from database. I am wondering if any one can help me on this one. Cheers!
  8. Hello, what are the best way to determine which page is being view. I am planning to use this hook displayHeader to retrieve information about which page is being viewed by visiting customer. This is to be used for analytical purposes (i.e. Funnelling). Is there such function or variables where it returns which page is being viewed (e.g. product-details, product-list, homepage, my-account, etc) I am using Prestashop 1.5.4 Thanks for the help. Cheers!
  9. Hello, I tried to execute the following code: if (($cartRule = new CartRule(CartRule::getIdByCode($code))) && Validate::isLoadedObject($cartRule)) { $is_applied = $this->context->cart->addCartRule($cartRule->id); echo "<pre>"; print_r($is_applied); die(); Tools::redirect('index.php?controller=order-opc'); } however, it returns nothing at all (what-so-ever). I am using Prestashop 1.5.4 for this code. Can anyone help me why this is happening ? Am i missing something ? Cheers, Rama
  10. Hello @roja45, Thanks for your clarification, however it seems that the following code will be called upon, right before creating a new cart rule. public function hookActionObjectCartRuleAddBefore() { echo "testing"; die(); } However what i am trying to do is to have something like this : public function callThisWhenCustomerSubmitVoucherCodeFromChecktOut() { /* Place your code here. */ } I am wondering whether such hook exists ? Cheers
  11. Hi roja45, thanks for replying. I am using presta 1.5.4 and i dont see the hook u mention here http://doc.prestashop.com/m/mobile.action#page/11272205 I am currently view it in my phone, ao probably i missed it, nevertheless i will check it again. Thanks
  12. Hello Guys, I'd like to know whether there is a hook related to Cart Rule. I am using Prestashop 1.5.4 and here's what i'd like to achive When a customer submit a voucher code, it will then hook to a module i am developing. The module basically checks whether the code which just been submitted has a special prefix. If it does, then the module will generate a price rule on the fly (because the voucher code is not yet exist in the system). If the voucher code does not contain any prefix it will just check against the cart rule database (which already exist in the system / has been previously entered by admin). This might sounds odd, but the module i am creating is actually validating a voucher code generated by another system (external system). Please let me know whether this is possible. regards, Rama
  13. First of all, i think you are asking a technical question. Second of all, regarding with your issue open this file: defines.inc.php And set this: define('_PS_DEBUG_PROFILING_', false); to define('_PS_DEBUG_PROFILING_', true); Once you have done this, there will be a debugging console at the very bottom of every page. Take a screenshot out of it, and upload it here. Third of all, Go to your backoffice > modules and do this: Filter your modules to show all Installed modules Carefully select a module that you think you are not using Disable it Go to your front office, make sure nothing breaks Go back to your back office, Uninstall that module Rinse and Repeat
×
×
  • Create New...