Hello seyi,
Thanks a million, it worked this way.
if($_SESSION['cart']["idx"]>=1) {}
if($_SESSION['cart']["idx"]==0){}
elseif($_SESSION['cart'][0]["product_id"] != $d['product_id'])
{
global $mainframe;
$mainframe->enqueueMessage('Error here!','error');
return true;
}
Thanks for all the help, I really appreciated your effort, and WITHOUT abusing of your time, I have another question which I would appreciate just a light about it.
I'm using K2+VirtueMart with Joomla 1.5.
I have a coupons webpage. My problem is that when my clients go to account maintenance link, they have their order history with no problems. However, when they hit in the product that they bought, that link is associated with virtuemart ID and does not redirect to the K2 ID, which I would like to set. Is that possible?
I would like that my clients could have access to the product description even if those products are not available any more. In their order history, they only can click in virtuemart items, which will redirect them to the cart, rather to the products page..
So, basically clients can go to their order history, and hit in a product and is linked to:
index.php?option=com_virtuemart&page=shop.product_ details&flypage=flypage.tpl&product_id=8&Itemid=13 5
And I would like that the product would go to:
index.php?option=com_k2&view=item&id=58
My question is how to call the ID of K2?
Here's the part of the code:
/www/components/com_virtuemart/themes/simplecheckout/templates/pages/account.order_details.tpl.php - path
// ***** Change guard to use new flag $link_to_product instead of !empty( $product_id )
if( $link_to_product) {
echo '<a href="'.$sess->url( $mm_action_url."index.php?page=shop.product_details&product_id=$product_id") .'" title="'.$dbcart->f("order_item_name").'">';
}
$dbcart->p("order_item_name");
echo " <div style=\"font-size:smaller;\">" . $dbcart->f("product_attribute") . "</div>"
;
I think that the code should me similarly to K2Mart or something like that, but I wanted to stay with VirtueMart and K2. What's the relation of K2 and VirtueMart and how to fix it in order history?
Thanks in advance and one more time, thanks for the help.