Skip to main content

how do i control the add to cart landing page?

More
15 years 3 months ago #18338 by nicolas
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.

More
15 years 3 months ago - 15 years 3 months ago #18342 by Rickhavoc
$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..
Code:
http://206.217.193.31/~iqcell/index.php/phones/product/show/cid-2/name-tour-9630/category_pathway-22
Last edit: 15 years 3 months ago by Rickhavoc.

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

More
15 years 3 months ago #18355 by nicolas
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.

More
15 years 3 months ago #18365 by Rickhavoc

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

Time to create page: 0.192 seconds
Powered by Kunena Forum