Jump to content

jemmasta

Members
  • Content count

    23
  • Joined

  • Last visited

Profile Information

  • Real Name
    Aarne Salminen
  1. jemmasta

    Wishlist 3.0 Support Thread

    As it seems the wishlist + ibox login work ONLY if your cookie settings are correct, so only through cookie session, not otherwise. So have "Force Cookie Use" on true on your backend AND your cookie settings correct. I fixed my configure to have a working cookie settings on my local machine and this error went away. If I took off the cookie settings, logging in with loginbox -> not working. Also if you do development on "localhost", this combination won't work if you address to your dev site as "http://localhost", use your IP and have your configure accordingly for this IP and everything works. Also finally, you can't use option "Recreate Session" with this combination. It has to be "False" on backend. Also I found another issue which is separate from the wishlist+ibox login problem, but had to repair it nevertheless to make this work so I'll post it here as well, in case someone has this exact same problem: the error in question is Call to a member function add_current_page() on a non-object which is on navigation object. fix for this: Change in catalog/includes/application_top.php : from: // navigation history if (tep_session_is_registered('navigation')) { if (PHP_VERSION < 4) { $broken_navigation = $navigation; $navigation = new navigationHistory; $navigation->unserialize($broken_navigation); } } else { tep_session_register('navigation'); $navigation = new navigationHistory; } $navigation->add_current_page(); to: // navigation history if (tep_session_is_registered('navigation') && is_object($navigation) { if (PHP_VERSION < 4) { $broken_navigation = $navigation; $navigation = new navigationHistory; $navigation->unserialize($broken_navigation); } } else { tep_session_register('navigation'); $navigation = new navigationHistory; } $navigation->add_current_page(); fix can be found in forums here: CLICK Hope this helps, if anyone has same issues. :)
  2. jemmasta

    Wishlist 3.0 Support Thread

    If it's usable, it's being used. ;) And if it works, it's being used even more. :D But back to business, I have a problem with Wishlist 3.5d and iBox login/ajax login contribution. In bug tracking I've found out that with this session information: wishlist|O:8:"wishlist":1:{s:6:"wishID";N;}, login works, from login.php page when there's no session involved on landing on login.php How ever when going through loginbox.php or with that session to login.php the situation is the same, and in this case session information is as follows: wishlist|O:8:"wishlist":0:{} OR wishlist|N; Whenever session "wishlist" is empty or not available, login won't work. The error message is: Call to a member function restore_wishlist() on a non-object which is fairly logical, since empty wishlist is a non-object, I guess. But what I can't seem to be able to figure out is, why login.php creates wishID = N into session in case where no session is to begin with. But won't do the same if session is active. Also I noticed that when loginbox posts information to login.php, session ID changes. Might this cause the problem? When not using loginbox, and going through a session link to login.php and the session ID stays the same, login does again work. But how do I keep session the same when posting from loginbox to login? Can anyone wiser help in this specific problem? osC version is the OM 2.2a.
  3. jemmasta

    RMA Returns error for 2.2 MS2

    The 2.5H Repackaged seemed to miss password_forgotten.php for admin side. Am I supposed to copy the one from catalog or what? :)
  4. jemmasta

    Attribute Product Codes [Contribution]

    The above modification allows it to work with 2.2rc2a. Don't know if the problem mentioned is on other revisions, but I have it working on 2.2rc2a after installation just make the modification I've mentioned above your post. :)
  5. jemmasta

    Attribute Product Codes [Contribution]

    Ok, managed to fix this. :) I changed this part: if (is_array($this->contents[$products_id]['attributes'])) { while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { $attribute_code_query = tep_db_query("select code_suffix, suffix_sort_order from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'"); $attribute_code = tep_db_fetch_array($attribute_code_query); if (tep_not_null($attribute_code['code_suffix'])) { $attribute_code_array[(int)$attribute_code['suffix_sort_order']] = $attribute_code['code_suffix']; } } to this: if (is_array($this->contents[$products_id]['attributes'])) { $i = 0; foreach ($this->contents[$products_id]['attributes'] as $attributes){ $option = array_keys($this->contents[$products_id]['attributes']); $value = $this->contents[$products_id]['attributes']; $attribute_code_query = tep_db_query("select code_suffix, suffix_sort_order from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' and options_id = '" . (int)$option[$i] . "' and options_values_id = '" . (int)$value[$option[$i]] . "'"); $attribute_code = tep_db_fetch_array($attribute_code_query); if (tep_not_null($attribute_code['code_suffix'])) { $attribute_code_array[(int)$attribute_code['suffix_sort_order']] = $attribute_code['code_suffix']; } $i++; } So changed while logic to foreach and removed the each() by fetching key values by array_keys and using those values to point to correct option values. Perhaps a bit crude, but now it works as it should've in the first place. :) It really seems that reusing each() within a loop that has already used each() caused this problem, at least in PHP5. This solves the problem.
  6. jemmasta

    Attribute Product Codes [Contribution]

    Ok, found the following: and Wouldn't this mean, that since each() has been used in while (list($products_id, ) = each($this->contents)) { It would point to left on the NEXT product in while when it reaches each($this->contents[$products_id]['attributes']) and so would return FALSE, because pointer is actually at the end of the array contents. Is there any workaround available for this problem?
  7. jemmasta

    Attribute Product Codes [Contribution]

    Did a reinstall, no change. Also tried with while (each($this->contents[$products_id]['attributes'])){ And even then while was not entered. So each($this->contents[$products_id]['attributes']) for some reason returns false even if it has correct array values right before, I'm stumbled.
  8. jemmasta

    Attribute Product Codes [Contribution]

    I have a problem in getting this to work. For some reason the suffix won't go through. In catalog/includes/classes/shopping_cart.php and in function get_products() the following: $attribute_code_array = array(); if (is_array($this->contents[$products_id]['attributes'])) { while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { $attribute_code_query = tep_db_query("select code_suffix, suffix_sort_order from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'"); $attribute_code = tep_db_fetch_array($attribute_code_query); if (tep_not_null($attribute_code['code_suffix'])) { $attribute_code_array[(int)$attribute_code['suffix_sort_order']] = $attribute_code['code_suffix']; } } $separator = ''; if (count($attribute_code_array) > 1) { $separator = '-'; } elseif (count($attribute_code_array) == 1) { $separator = '/'; } $products_code = $products['products_model'] . $separator . implode("/", $attribute_code_array); } The function won't go in to while loop: while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { and thus won't get the suffix from database and by that it returns wrong code, which is the product_model only. I can't figure out why the while clausule would be false in this case. Could someone smarter help? I've tested that $this->contents[$products_id]['attributes'] does have correct values. For some reason that while is just being ignored!
  9. jemmasta

    Attribute Product Codes [Contribution]

    Do note that in file catalog/includes/classes/shopping_cart.php the change has to be in function get_products().
  10. Went through the installation with narrow comb and found reasons. First was plainly own stupidity (as in most parts these problems are :), added part of code to wrong place. :D A classic mistake. Had to install the subtotal fix by agrafuese and modificate it a bit since I have always taxes applied. With this contribution subtotal will not show taxes included necessary. If you want taxes included on your subtotal line change: $actual_shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); $applied_discount = 0; //agrafuese - subtotal fix $shown_price = $product['final_price'] * $product['qty']; } else { $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); } /********** } $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); **********/ to: $actual_shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); $applied_discount = 0; //agrafuese - subtotal fix $shown_price = $this->apply_tax($product['final_price'] * $product['qty'], $product['tax']); } else { $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); } /********** } $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); **********/ This did the trick for me. :)
  11. For some reason after installing 3.31 I have two bugs. Two features no effect what so ever: Display subtotal with applied discount? false Still DOES deduct discount to subtotal line. Allow negative order total? false And again no effect so accepting negative order total. Otherwise the contribution works just nicely. Could anyone help with this issue?
  12. Might just be the tabs you have on that line that cause that error. Otherwise I can't see nothing else wrong with it. Although I might be blind as well.
  13. Great contribution, thanks. Although I have one problem. All payment options I have are by cards thus gathering card info. When an order is 0, that shouldn't be needed. So how can I override this so that when order total is 0 the site redirects directly to checkout_success and processes the order normally?
  14. jemmasta

    [Contribution] SEO-G

    Hmm.. well this problem happened because I tried to sync, but was too tired or something to see all the differences. But learned something in the process. :) Maybe you should emphasize the critical points like these on the documentation. This might help some people to do their own troubleshooting. Still, your documentation is one of the best ones I've ever seen.
  15. jemmasta

    [Contribution] SEO-G

    This helped, you really generate a wooden eye when staring at the code for few hours. :) Thank you.
×