Post by ckvist » Fri Nov 23, 2012 12:16 am

Hi.

I have a product with two options.

Can i make a link, that automaticly adds it to the cart, using a specific set of options?

New member

Posts

Joined
Mon Sep 26, 2011 2:16 am

Post by ckvist » Fri Dec 07, 2012 9:16 pm

No one?

New member

Posts

Joined
Mon Sep 26, 2011 2:16 am

Post by daik01 » Fri Dec 07, 2012 10:59 pm

You could change the code in catalog\controller\checkout\cart.php.

if (isset($this->request->post['option'])) {
$option = array_filter($this->request->post['option']);
} else {
$option = array(<---optionid--->>);
}

This will set a default option and add it to your cart

TOP 5 Opencart Extensions:
1:Opencart Reservations
2:Stock Report, import/export stock levels with Excel
3:3D Carousel
4:Product Price Changer by Category
5:Set price Inclusive Taxes
DEMO SHOP


Active Member

Posts

Joined
Sun Oct 21, 2012 3:18 am


Post by ckvist » Fri Dec 07, 2012 11:43 pm

daik01 wrote:You could change the code in catalog\controller\checkout\cart.php.

if (isset($this->request->post['option'])) {
$option = array_filter($this->request->post['option']);
} else {
$option = array(<---optionid--->>);
}

This will set a default option and add it to your cart
But what i need is to make a link. - That way, i can post the link on other locations on my site, and add with specific options.

New member

Posts

Joined
Mon Sep 26, 2011 2:16 am
Who is online

Users browsing this forum: No registered users and 133 guests