You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
I would prefer to have the "product offer name" as opposed to the "inventory item name" showing in the shopping cart. I edited cartdisplay.php and changed xinvid to xprodid which seems to work. Have I done the right thing and will it have any adverse effect elsewhere?
// +-- // | Display Name Override // +-- if (!(empty($offeritem['xinvid']))) { $dispname = $offeritem['name']; if ($shownums) {$dispname = $offeritem['number'] . ' - ' . $offeritem['name'];} if ($offeritem['imgsm'] != 'none.png') {$dispimg = 'media/ecom/invsm/' . $offeritem['imgsm'];} } // End of if statement.
Offline
I wouldn't do that. What happens when your offers start allowing customers to select different inventory items, or you start offering package deals of inventory items? For now it would be much better to just rename the inventory items and leave things as they are. If your vendors need a different name for the inventory items, there's a vendor description field for that (vendor item number too).
Offline
the problem I have is that I stock a tyre which is suitable for several different strollers. The inventory name is "tyre 1234" and is associated with 10 different product offers. If a customer orders product offer "Tyre for Quinny Buzz Stroller" it shows in the cart as "tyre 1234" and they might think they have ordered the wrong item. Is there a way around this?
Offline
Interesting. Perhaps the best thing to do in your case would be to prepend or append the offer name to the inventory item name when saved to the cart in the build_item() function in {private}/apps/ecom/ECOM_Cart/ECOM_Cart.php. Look for:
$item['name'] = (isset($offer['name']) ? $offer['name'] : 'Item');
Right below it, add:
if (!(empty($pricemap['xinvid']))) {$item['name'] .= ' (' . $item['offername'] . ')';}
This covers you everywhere, all the way through checkout and the order process. Your cart display mod only covered you on the shopping cart page.
Offline
From modifying some other displays, the $offers array usually contains a lot of useful info including the custom data fields for both the Product Offer and Inventory item. I am sure there will be something with both.
The first thing I would try would be to add some custom data to the inventory item to flag additional info may be available and then to put custom data in the Product Offer e.g. "for Quinny Buzz Stroller".
That way you can look for the tag in the inventory item and if present add the extra info onto the description.
"tyre 1234"
"for Quinny Buzz Stroller" (could style that also)
Just a suggestion
Rob
Offline
thank you both for your suggestions.
Nick - I tried yours but it made no difference. Do I still need to edit cartdisplay.php as per my first post?
Offline