CMS MADE SIMPLE FORGE

Cart2

 

[#10862] Cart shows options from previous products in 'add to cart'

avatar
Created By: Ruud van der Velden (ruudvdvelden)
Date Submitted: Wed Jan 27 11:52:17 -0500 2016

Assigned To: Robert Campbell (calguy1000)
Version: 1.1.3
CMSMS Version: 2.1.1
Severity: Minor
Resolution: None
State: Open
Summary:
Cart shows options from previous products in 'add to cart'
Detailed Description:
Consider 3 products:

product A (SKU: A, no product options) 
product B (SKU: B) incl 2 product options SKUs B1 and B2
product C (SKU: C, no product options)

Use default sample Products summary template and uncomment the {Cart} call:

  {* include the cart *}
  <div>
  {Cart2 sku=$entry->sku} 
  </div>
  {* *}

Then on some content page include {Products} 

Result:

Products are listed in Order C - B - A
Product C does NOT show product options in Add to Cart thing (expected)
Product B DOES show product options in Add to Cart thing (expected)
Product A DOES show product options in Add to Cart thing (NOT expected)

Note:

Tried to 'unset' $options variable in AddToCart template (success) but seems
module sets it on next call from Products summary template iteration:

code at end of AddToCart template:

<!-- options before: 
 {$options|print_r} 
-->
{$options=null}
<!-- options after:
  {$options|print_r} 
-->

Result (from html source):

...Product C...
<-- options before:
  1 
-->
<-- options after:
  1 
--> 
  
...Product B...

<-- options before:
  Array
(
[dd96c555e92b988bc022e929cf18c6dc::QjE6OjQ6Ojo6LTE6Og==] =>   Option
B1:&nbsp;$4.00
[5ca3dd1e3851493f80aca7386a738d2e::QjI6OjU6Ojo6LTE6Og==] =>   Option
B2:&nbsp;$5.00
)
1 
-->
<-- options after:
  1 
--> 
...Product A...
<-- options before:
  Array
(
[dd96c555e92b988bc022e929cf18c6dc::QjE6OjQ6Ojo6LTE6Og==] =>   Option
B1:&nbsp;$4.00
[5ca3dd1e3851493f80aca7386a738d2e::QjI6OjU6Ojo6LTE6Og==] =>   Option
B2:&nbsp;$5.00
)
1 
-->
<-- options after:
  1 
--> 



Virgin CMSMS install with only necessary modification to test this issue.


Cms Version: 2.1.1

Installed Modules:

    AdminSearch: 1.0
    CMSContentManager: 1.1
    DesignManager: 1.1.1
    FileManager: 1.5.2
    MicroTiny: 2.0.2
    ModuleManager: 2.0.1
    Navigator: 1.0.2
    News: 2.50.3
    Search: 1.50.2
    CGExtensions: 1.51.1
    CGEcommerceBase: 1.5.2
    CGSimpleSmarty: 2.0.5
    JQueryTools: 1.3.8
    Products: 2.24.2
    Cart2: 1.1.3
    CGContentUtils: 2.1
    Gallery: 2.1


History