Forums / Setup & design / shop options

shop options

Author Message

Martin Ulrich

Wednesday 20 October 2004 3:39:38 am

hi,
for my products (travel tours) I'd like to have tour-dates as sub-options

I change my class (product) and add datatype option.

In product full view I can fetch it by
{attribute_view_gui attribute=$node.object.data_map.tourdate}
can choose my date here, and so far everything is ok.

Now I add the product to basket. And here is my problem. How I can fetch that options in basket?
There is a section {section show=$product_item.item.item_object.option_list} in basket. I tried everything:
- named my optionfield in class "option_list"
- named my optionfield in class "name" "value" "price" (such as it called in the section option_list)

But still there are no product options shown in basket.
What do I have done wrong? ;-) (sorry for english)

*thanks*

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Silke Fox

Wednesday 20 October 2004 4:20:19 am

Hi Sepp,

I'm not sure if product options are available in the basket.
Did you try something like

{$product_item.item|attribute(show,2)}

in the basket.tpl to find out more?

silke

Wenyue Yu

Wednesday 20 October 2004 4:24:43 am

Hi,

I guess you can use {$product_item.item.item_object.contentobject.data_map.tourdate} to get this attribute in template.

Regards,
wenyue

Martin Ulrich

Wednesday 20 October 2004 8:12:54 am

thanks!!! unfortunately no success until now.

{$product_item|attribute(show)} tells :

Attribute 	Type 	Value
>option_list 	array 	Array(0)

so it should work somehow

In ... loop=$basket.items ... I can fetch the options with
{attribute_view_gui attribute=$product_item.item.item_object.contentobject.main_node.data_map.tourdate} but it is always the first option selected than.

And it doesnt work in {section show=$product_item.item.item_object.option_list}

however my eyes say they want to have a break for today.

wish you much more success
see you next year )

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Martin Ulrich

Wednesday 20 October 2004 9:06:36 am

Yeah, Iv done it !!!! :-))

all that was wrong:

In the product-full-view-template where I call the addtobasketaction
my {attribute_view_gui attribute=$node.object.data_map.tourdate} had to be WITHIN the form:

  {section show=is_unset( $versionview_mode )}
        <div class="content-action">
  <form method="post" action={"content/action"|ezurl}>        
        <div class="attribute-small">
        <p>
        {attribute_view_gui attribute=$node.object.data_map.tourdate}
        </p>
        </div>
<input type="submit" class="defaultbutton" name="ActionAddToBasket" value="in den Rucksack damit" />
   <input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
   <input type="hidden" name="ContentObjectID" value="{$node.object.id}" />
   <input type="hidden" name="ViewMode" value="full" />
   </form>
   </div>
   {/section}

good end after all, :-))

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Daniela Moreno

Monday 28 March 2005 1:10:45 pm

cool!
hey what did u change in basket.tpl?
bcuz i get nothing!

Martin Ulrich

Tuesday 29 March 2005 9:53:16 am

a little bit time passed since that, and I done it with 3.5.0
there is nothing to change in basket.tpl (news demo)
it was ok and works with demo basket.tpl

for me the probleme was, as mentioned above, the product.tpl with the inputbutton "Add to basket".

There is a form in product.tpl and I forgot to put the identifier (Attribute "option") WITHIN this form.

hi:)

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

D K

Monday 09 March 2009 3:49:45 am

Can you please explain how to add options. Because I have added options using "Selection". It shows in the product. But once I submit it shows the array(0) in the basket.

Thanks.

http://www.eyepax.com

André R.

Monday 09 March 2009 4:15:11 am

Try with multioption2 data type instead, it is a datatype for the shop.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

eZ debug

Timing: Jan 18 2025 11:33:20
Script start
Timing: Jan 18 2025 11:33:20
Module start 'content'
Timing: Jan 18 2025 11:33:20
Module end 'content'
Timing: Jan 18 2025 11:33:20
Script end

Main resources:

Total runtime0.1889 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 588.7031180.8516
Module start 'content' 0.00760.0052 769.5547101.9453
Module end 'content' 0.01280.1761 871.5000531.2109
Script end 0.1888  1,402.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00371.9639200.0002
Check MTime0.00140.7184200.0001
Mysql Total
Database connection0.00140.721410.0014
Mysqli_queries0.140574.33821410.0010
Looping result0.00140.73441390.0000
Template Total0.175592.910.1755
Template load0.00070.375310.0007
Template processing0.174892.521810.1748
Override
Cache load0.00050.253510.0005
Sytem overhead
Fetch class attribute can translate value0.00191.009310.0019
XML
Image XML parsing0.00030.160910.0003
General
dbfile0.00160.8618200.0001
String conversion0.00000.003030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs