Related Items (MS2)
Hi there.
How would I go about adding related items in checkout?
eg — if a user is buys a tablet, and a phone, then on (or near) checkout, how can I show accessories for each item?
Thank you
How would I go about adding related items in checkout?
eg — if a user is buys a tablet, and a phone, then on (or near) checkout, how can I show accessories for each item?
Thank you
Комментарии: 6
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
1. You need create new link with type «one to many»
2. Then you need to link your products (tablets and phones) with other products (accessories). See tab «links» in product management.
3. Now you can add accessories on products page by snippet msProducts (see params link and master)
4. But you want to add this in the checkout, so you need to make you own snippet, that will look into MS2 cart and show related items.
Here is example:
I've tried following the instructions, but my coding skills are lacking.
I updated backup copy of my msCart snippet with your code (see below) but all I get on the cart now is an array (please see after the block of code)
Where did I go wrong?
The output:
Array ( [goods] => Array ( [id] => 8 [type] => document [contentType] => text/html [pagetitle] => 9.7" Select Tablet [longtitle] => Lava 9.7" Select Tablet [description] => [alias] => lava-9.7-select-tablet [link_attributes] => [published] => 1 [pub_date] => 0 [unpub_date] => 0 [parent] => 3 [isfolder] => 0 [introtext] => [richtext] => 1 [template] => 4 [menuindex] => 3 [searchable] => 1 [cacheable] => 1 [createdby] => 1 [createdon] => 1365040697 [editedby] => 1 [editedon] => 1372927504 [deleted] => 0 [deletedon] => 0 [deletedby] => 0 [publishedon] => 1372927504 [publishedby] => 1 [menutitle] => [donthit] => 0 [privateweb] => 0 [privatemgr] => 0 [content_dispo] => 0 [hidemenu] => 0 [class_key] => msProduct [context_key] => web [content_type] => 1 [uri] => lava-9.7-select-tablet.html [uri_override] => 1 [hide_children_in_tree] => 0 [show_in_tree] => 0 [properties] => [article] => R9-116S-CH [price] => 3 250.00 [old_price] => 0.00 [weight] => 0.57 [image] => /lava/assets/images/products/8/cd264e10acda36036233db4263b6ddbf.jpg [thumb] => /lava/assets/images/products/8/120x90/cd264e10acda36036233db4263b6ddbf.jpg [vendor] => 0 [made_in] => [new] => 0 [popular] => 0 [favorite] => 0 [tags] => [""] [color] => [«Black»,«White»] [size] => [""] [source] => 2 [vendor.name] => [vendor.resource] => [vendor.country] => [vendor.logo] => [vendor.address] => [vendor.phone] => [vendor.fax] => [vendor.email] => [vendor.description] => [vendor.properties] => [key] => 10e44478457d8ac76e238f8d0eff8aeb [count] => 1 [cost] => 3250 [option.color] => Black ) [total_count] => 1 [total_weight] => 0.57 [total_cost] => 3 250.00 )
Try to hire php programmer.