- Posts: 156
- Thank you received: 0
how do i control the add to cart landing page?
i want to have 3 different pages where someone might land after adding a item to the cart different item different page they will be landing on. how can i make that happen with HikaShop?
example--
1)
normal add to cart page
2)
i just added a phone and the landing page is making sure i add a plan.
3)
i just added a plan to my cart and the landing page is asking me if i want a phone.
how can i make this happen?
thanks in advance your the best
Please Log in or Create an account to join the conversation.
Edit the file cart of the view checkout via the menu Display->Views. There, add some code to check on the content of cart and if the cart has a phone and no plan redirect to where you want or if the cart has a plan and no phone, redirect where you want.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
If you knew that much, then, you could have figured the code... It's just 10 lines of code:
$phone = $plan = false;
foreach($this->rows as $i => $row){
if($row->type_of_product=='plan') $plan=true;
if($row->type_of_product=='phone') $plan=true;
}
$app =& JFactory::getApplication();
if($phone && !$plan){
$app->redirect('my_link_1');
}elseif(!$phone && $plan){
$app->redirect('my_link_2');
}
You need also to have a custom field of the table 'product' with the values 'plan' and 'phone' and the column name type_of_product so that you can select whether a product is a plan or a phone.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
You need a commercial version of HikaShop in order to have more possibilities.
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
but is there any other way i can trigger this?
Please Log in or Create an account to join the conversation.
It's quite weird, you have to parse description in several views in order to remove the "hidden" text and process it in the product page to display extra data.. But it could work !
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
If not, please do a screenshot of the custom field options.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
206.217.193.31/~iqcell/index.php/phones/.../category_pathway-22
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Posting several times won't make me answer faster. We're doing the best we can to answer everyone...
Please Log in or Create an account to join the conversation.
$phone = $plan = false;
foreach($this->rows as $i => $row){
if($row->type_of_product=='plan') $plan=true;
if($row->type_of_product=='phone') $plan=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 ');
}
What i want to Happen is that if there is a Phone in the Cart, to take the user to a page offering to check out or select a plan. there will be links on that page to add a plan to the cart. not with the Add to Cart Button but using the hyperlink from the Add to cart Html of a Product.
As of now when i add the phone it takes me to the page where the plans are but after i click the link to add the plan to the cart. it stays on the same page.
Look forward for to the solution.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.