how do i control the add to cart landing page?

  • Posts: 84034
  • Thank you received: 13615
  • MODERATOR
14 years 3 weeks ago #18338

Please change the line:
if($row->type_of_product=='phone') $plan=true;
to:
if($row->type_of_product=='phone') $phone=true;

Then, make sure that you selected the "type of product" in your product edition screen and saved the product information.

Then, try again.

Please Log in or Create an account to join the conversation.

  • Posts: 156
  • Thank you received: 0
14 years 3 weeks ago #18342

$phone = $plan = false;
foreach($this->rows as $i => $row){
if($row->type_of_product=='plan') $plan=true;
if($row->type_of_product=='phone') $phone=true;
}
$app =& JFactory::getApplication();
if($phone && !$plan){
}elseif(!$phone && $plan){
$app->redirect(' 206.217.193.31/~iqcell/index.php?option=...t&view=article&id=18 ');
}

This is what i am using now. and it's going straight to check out after i click add to cart on the phone page..

http://206.217.193.31/~iqcell/index.php/phones/product/show/cid-2/name-tour-9630/category_pathway-22

Last edit: 14 years 3 weeks ago by Rickhavoc.

Please Log in or Create an account to join the conversation.

  • Posts: 84034
  • Thank you received: 13615
  • MODERATOR
14 years 3 weeks ago #18355

You should also add the line:
$app->redirect('206.217.193.31/~iqcell/index.php?option=com_content&view=article&id=18');
in the if($phone && !$plan){
otherwise, if the phone is in the cart but not the plan, it goes straight to the cart...

Please Log in or Create an account to join the conversation.

  • Posts: 156
  • Thank you received: 0
14 years 3 weeks ago #18365

Perfect :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum