Subproduct name concatenated after add to cart button

General ShopSite user discussion

Subproduct name concatenated after add to cart button

Postby bobt » Fri Aug 11, 2006 1:12 pm

In the table on the cart page that lists items in the cart, is the name column.

I'm having an issue with certain names of subproducts. They show up concatenated with the name of their 'more information' page or the name of the 'parent product' (depending on what page the [Add to Cart] button was clicked from.)

Products that are not subproducts only display the Product Name (correct).

I need all items to only display Product Name, regardless of whether they are subproducts or not. (They can't be concatenated with their parent pages or products names.)

Is there a way to change this behavior? Shopsite 8.0 manager on a shared server. Thank you

:shock:
bobt
 
Posts: 1
Joined: Fri Aug 11, 2006 12:51 pm

Postby robm » Fri Aug 11, 2006 1:18 pm

Only with Pro 8.x can you remove the parent name from the subproduct name on the cart page. This is not an option in Manager. I am not aware of a workaround for this.
robm
 
Posts: 463
Joined: Fri Aug 04, 2006 5:46 pm
Location: Connecticut

Postby Jim » Fri Aug 11, 2006 1:20 pm

Commerce Setup > Order System > Shopping cart
check the box "Display subproducts without parent name:"

Jim
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Jim » Fri Aug 11, 2006 1:23 pm

I didn't notice the store was "manager" . Rob is correct, there is no way to change this in a manger store except by not having subproducts.

Jim
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby loren_d_c » Fri Aug 11, 2006 5:17 pm

There actually is a way to do this in Manager, but it is not as easy as checking a checkbox, it involves making a custom product template.

Basically, the only way the shopping cart knows to add the parent product's name to the subproduct name is that the subproduct link (or form) has an extra parameter in it (super=[itemnum_of_parent]) that indicates the item number of the parent product. If that were left off, even though the product being added is assigned as a subproduct the cart wouldn't display it with the parent product name because it wouldn't even know that there is a parent product. But all default product template tags that are normally used to create an add to cart button for a subproduct automatically add this value to the add to cart link (or form).

But you could make a custom product template and in the DEFINE SUBPRODUCT section don't use the normal template tags that create the add to cart form or link, instead manually create the form or link from more atomic template tags. For example, instead of [-- PRODUCT.OrderCheckout --] you can use:

<a href="[-- SHOPPING_CART_URL BASE --]/order.cgi?storeid=[-- STORE.ID --]&dbname=products&itemnum=[-- PRODUCT.RecordNumber --]&function=add">Add to Cart</a>

Which will create an Add to Cart link for the product wihout the parent products name associated with it. If you also send Quantity and/or Ordering Options to the cart with the subproducts, then it gets a bit more complicated because you have to make it as a form instead of just an href link, but a good example of this is in the documentation at:
http://www.shopsite.com/templates/examp ... tions.html

-Loren
loren_d_c
 
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere


Return to User Forum

Who is online

Users browsing this forum: No registered users and 150 guests