close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Grouping related products in cart

Thread began 1/29/2018 2:30 pm by Dave Buchholz | Last modified 4/02/2019 9:46 am by Dave Buchholz | 1620 views | 5 replies

Dave BuchholzBeta Tester

Ray,

I am resurrecting this old thread as I have only just got back to this !

So when I print_r the ecart object like so:

print '<pre>';
print_r($eCart1);
print '</pre>';


this is an example of what I see

eCart1_Definition Object
(
[CartName] => eCart1
[PersistanceType] => 0
[CurrencyAlign] => 0
[CurrencyPrefix] => $
[DecimalPlacesC] => 2
[DecimalPlacesW] => 2
[DisplayIndex] => 0
[ForceDecimalsC] => 1
[ForceDecimalsW] => 1
[NumberDisplay] => 0
[WeightAlign] => 1
[ChargesDisplayIndex] => 0
[DiscountsDisplayIndex] => 0
[TaxDisplayIndex] => 0
[ShippingDisplayIndex] => 0
[Charges] => Array
(
)

[Discounts] => Array
(
)

[Tax] => Array
(
)

[Shipping] => Array
(
)

[ShippingIsTaxed] =>
[cartAction] =>
[redirStr] =>
[CurrencyCode] => USD
[WeightSuffix] => oz
[Columns] => Array
(
[0] => Array
(
[0] => ID
[1] => N
)

[1] => Array
(
[0] => Name
[1] => T
)

[2] => Array
(
[0] => Description
[1] => T
)

[3] => Array
(
[0] => Thumbnail
[1] => T
)

[4] => Array
(
[0] => Weight
[1] => W
)

[5] => Array
(
[0] => Quantity
[1] => N
)

[6] => Array
(
[0] => Price
[1] => C
)

[7] => Array
(
[0] => SKU
[1] => T
)

[8] => Array
(
[0] => Options
[1] => T
)

[9] => Array
(
[0] => DiscountApplied
[1] => I
)

[10] => Array
(
[0] => DiscountShown
[1] => I
)

[11] => Array
(
[0] => MoreDetails
[1] => I
)

[12] => Array
(
[0] => Shipping
[1] => I
)

[13] => Array
(
[0] => Taxable
[1] => I
)

[14] => Array
(
[0] => BrandURMP
[1] => I
)

[15] => Array
(
[0] => Discountable
[1] => I
)

[16] => Array
(
[0] => ParentSKU
[1] => T
)

[17] => Array
(
[0] => ProductType
[1] => N
)

)

[Items] => Array
(
[0] => eCart1_ItemDefinition Object
(
[ID] => 3357
[Name] =>
[Description] => Dishwasher with Triple Filter Wash System - black
[Thumbnail] => https://www.specsserver.com/CACHE/FRQMDJISYEAY.JPG?width=300&height=300
[Weight] => 0
[Quantity] => 1
[Price] => 389
[SKU] => ADB1400AGB
[Options] =>
[DiscountApplied] => 0
[DiscountShown] => 0
[MoreDetails] => 0
[Shipping] => 0
[Taxable] => 0
[BrandURMP] => 0
[Discountable] => 0
[ParentSKU] => ADB1400AGB
[ProductType] => 1
[WAUID] => 155405352322625746
[TotalWeight] => 0
[TotalPrice] => 389
[FullDetails] => 1 (3357)
)

[1] => eCart1_ItemDefinition Object
(
[ID] => 9
[Name] => Dishwasher Install Kit & Adapter (Required)
[Description] => Purchased with ADB1400AGB
[Thumbnail] => /_site-files/img/cart-pages/no-image.jpg
[Weight] => 0
[Quantity] => 1
[Price] => 29.99
[SKU] => DW-INSTALL-KIT
[Options] =>
[DiscountApplied] => 0
[DiscountShown] => 0
[MoreDetails] =>
[Shipping] => 0
[Taxable] => 1
[BrandURMP] => 0
[Discountable] => 0
[ParentSKU] => ADB1400AGB
[ProductType] => 3
[WAUID] => 155405352322722055
[TotalWeight] => 0
[TotalPrice] => 29.99
[FullDetails] => 1 Dishwasher Install Kit & Adapter (Required) (9)
)

[2] => eCart1_ItemDefinition Object
(
[ID] => 406
[Name] =>
[Description] => GE Cafe™ Series 30" Slide-In Front Control Range with Warming Drawer
[Thumbnail] => https://www.specsserver.com/CACHE/FRQULVSTJSHK.JPG?width=300&height=300
[Weight] => 0
[Quantity] => 1
[Price] => 2499
[SKU] => CGS986SELSS
[Options] =>
[DiscountApplied] => 0
[DiscountShown] => 0
[MoreDetails] => 0
[Shipping] => 0
[Taxable] => 0
[BrandURMP] => 0
[Discountable] => 0
[ParentSKU] => CGS986SELSS
[ProductType] => 1
[WAUID] => 155405372861825180
[TotalWeight] => 0
[TotalPrice] => 2499
[FullDetails] => 1 (406)
)

[3] => eCart1_ItemDefinition Object
(
[ID] => 4
[Name] => Gas Line Install Kit (Required)
[Description] => Purchased with CGS986SELSS
[Thumbnail] => /_site-files/img/cart-pages/no-image.jpg
[Weight] => 0
[Quantity] => 1
[Price] => 27.99
[SKU] => COOKING-GAS-LINE
[Options] =>
[DiscountApplied] => 0
[DiscountShown] => 0
[MoreDetails] =>
[Shipping] => 0
[Taxable] => 1
[BrandURMP] => 0
[Discountable] => 0
[ParentSKU] => CGS986SELSS
[ProductType] => 3
[WAUID] => 155405372861975651
[TotalWeight] => 0
[TotalPrice] => 27.99
[FullDetails] => 1 Gas Line Install Kit (Required) (4)
)

)

)



what I want is to be able to access the [items] array so that I can order them based on the ParentSKU and ProductType fields, how can I do that ?

Or should I be looking at the session $_SESSION['eCart1_Items'] ?
I am still having issues with exploding this so

$temp = explode("§WA§",$_SESSION['eCart1_Items']);


gives me

Array
(
[0] => 3357|WAECART||WAECART|Dishwasher with Triple Filter Wash System - black|WAECART|https://www.specsserver.com/CACHE/FRQMDJISYEAY.JPG?width=300&height=300|WAECART|0|WAECART|1|WAECART|389|WAECART|ADB1400AGB|WAECART||WAECART|0|WAECART|0|WAECART|0|WAECART|0|WAECART|0|WAECART|0|WAECART|0|WAECART|ADB1400AGB|WAECART|1|WAECART|155405352322625746|WAECART|0|WAECART|389|WAECART|1 (3357)�WA�9|WAECART|Dishwasher Install Kit & Adapter (Required)|WAECART|Purchased with ADB1400AGB|WAECART|/_site-files/img/cart-pages/no-image.jpg|WAECART|0|WAECART|1|WAECART|29.99|WAECART|DW-INSTALL-KIT|WAECART||WAECART|0|WAECART|0|WAECART||WAECART|0|WAECART|1|WAECART|0|WAECART|0|WAECART|ADB1400AGB|WAECART|3|WAECART|155405352322722055|WAECART|0|WAECART|29.99|WAECART|1 Dishwasher Install Kit & Adapter (Required) (9)�WA�406|WAECART||WAECART|GE Cafe™ Series 30" Slide-In Front Control Range with Warming Drawer|WAECART|https://www.specsserver.com/CACHE/FRQULVSTJSHK.JPG?width=300&height=300|WAECART|0|WAECART|1|WAECART|2499|WAECART|CGS986SELSS|WAECART||WAECART|0|WAECART|0|WAECART|0|WAECART|0|WAECART|0|WAECART|0|WAECART|0|WAECART|CGS986SELSS|WAECART|1|WAECART|155405372861825180|WAECART|0|WAECART|2499|WAECART|1 (406)�WA�4|WAECART|Gas Line Install Kit (Required)|WAECART|Purchased with CGS986SELSS|WAECART|/_site-files/img/cart-pages/no-image.jpg|WAECART|0|WAECART|1|WAECART|27.99|WAECART|COOKING-GAS-LINE|WAECART||WAECART|0|WAECART|0|WAECART||WAECART|0|WAECART|1|WAECART|0|WAECART|0|WAECART|CGS986SELSS|WAECART|3|WAECART|155405372861975651|WAECART|0|WAECART|27.99|WAECART|1 Gas Line Install Kit (Required) (4)
)



which is an issue I think I have mentioned before.

Any help is greatly appreciated.

Thanks,

Dave Buchholz
I-CRE8 Limited

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...