- Posts: 86239
- Thank you received: 14228
how do i control the add to cart landing page?
15 years 3 months ago #18338
by nicolas
Replied by nicolas on topic Re: how do i control the add to cart landing page?
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.
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.
15 years 3 months ago - 15 years 3 months ago #18342
by Rickhavoc
Replied by Rickhavoc on topic Re: how do i control the add to cart landing page?
$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..
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.
15 years 3 months ago #18355
by nicolas
Replied by nicolas on topic Re: how do i control the add to cart landing page?
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...
$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.
15 years 3 months ago #18365
by Rickhavoc
Replied by Rickhavoc on topic Re: how do i control the add to cart landing page?
Perfect
Please Log in or Create an account to join the conversation.
Time to create page: 0.192 seconds