Author Topic: shop.cart.tpl.php a checkout_link redirect issue  (Read 14067 times)

kondzik1

  • Beginner
  • *
  • Posts: 4
shop.cart.tpl.php a checkout_link redirect issue
« on: March 14, 2010, 20:44:16 pm »
Hello, I don't know why, but When I'm in the basket and click on checkout_link to go to checkout, it redirects me to one of my product category (the one with id=1 to be specific). I tried to change this becauseI need it to redirect to all product list but I'm not good with php syntax. The code in shop.cart.tpl.php is:
Code: [Select]
$href = $sess->url( $_SERVER['PHP_SELF'].'?page=checkout.index&ssl_redirect=1', true);
    $href2 = $sess->url( $mm_action_url . "/index2.php?page=checkout.index&ssl_redirect=1", true);
    $class_att = 'class="checkout_link"';
Anyone knows how to change this redirect, please!!

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: shop.cart.tpl.php a checkout_link redirect issue
« Reply #1 on: March 15, 2010, 00:34:37 am »
You have a few problems.

1. you didn't create a master Joomla / VM link in your Joomla menu system, therefore Joomla defaults to Itemid of 1. Joomla needs an Itemid for your store, and the only way to do this right is to create a VM link in Joomla menu.

2. What version of VM you using?

3. What URL did you specify in your Secure URL in VM admin config? Is it the same as the regular URL?

kondzik1

  • Beginner
  • *
  • Posts: 4
Re: shop.cart.tpl.php a checkout_link redirect issue
« Reply #2 on: March 15, 2010, 09:40:39 am »
Hello and thanks for reply:
1. I've got several menu item made for virtuemart, sorry no to show direct link - I've got it on localhost. I goes like this:

- a menu item link from top menu to all product list (shop.browse in component parameters)
- three menu items from side menu
  * one link to all product list (shop.browse in component parameters)
  * one link to category 1 (cat id 1 in component parameters)
  * one link to category 2 (cat id 2 in component parameters)

I don't have an menu item created for virtuemart without component parameters (I didn't need one). But as I removed the shop.browse parameteres - checkout_link still redirects me to cat 1. And after I click on confirmation of order - it redirects me to index.php :/. I don't know if its relevent but I dissabled payment method step in configuration putting 0 next to checkbox.

2. 1.1.4 stable

3.
Site URL http://localhost/main_page_catalog/
Secure URL http://localhost/main_page_catalog/

Mayby it is possible to mannualy put wanted redirection url in shop.cart.tpl.php?

I hope You can help me...

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: shop.cart.tpl.php a checkout_link redirect issue
« Reply #3 on: March 15, 2010, 10:55:15 am »
Did you turn off your cookie check in VM config?

And likely because of non-www issues things are not working well. Try to put this on a sever with www access.

kondzik1

  • Beginner
  • *
  • Posts: 4
Re: shop.cart.tpl.php a checkout_link redirect issue
« Reply #4 on: March 15, 2010, 17:39:58 pm »
I put in on external server You can see under http://www.dreampage.pl/movens_test2/. It's in polish but You can see the virtuemart (with shop.browse parameter) here - http://www.dreampage.pl/movens_test2/pl/zamowienia.html. In left Menu You have:
 - item48 which also is shop.browse component
 - item49 which is category 1
 - item50 which is category 2.
Now, when I'm in the basket and click checkou_link it redirects me on item 52 (I can tell by the browser address)which, also represents category 1 but is in different menu. Than, if I confirm the order, it redirect me on index.php to display thanks.
I tried to on off cookies and set both Secure and Site URL on http://www.dreampage.pl/movens_test2/ but it still redirects me on those strange places...
It is so annoying and I don't have a clue why it is happening

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: shop.cart.tpl.php a checkout_link redirect issue
« Reply #5 on: March 15, 2010, 19:41:13 pm »
VM needs a master link, which should not be a category or anything. The first link you make to VM (be it a category or a product) in Joomla menu will be what VM uses for all Itemid.

1. You should have created a link to VM, and called it "Store" or "Shop" or something. Then create links to categories, etc, all you want to.

Solution: Find your link with itemid 52 (which should currently be a VM link with parameters), and label that Store, and make the link just a regular VM link (no parameters). Then make another link that idtemid 52 used to be.

With your SEF on, I cannot really troublehsoot more.