Forums / Install & configuration / Add to Cart button

Add to Cart button

Author Message

Blu Cava

Tuesday 14 January 2003 11:53:32 pm

Ok guys.. here goes.. I have just installed the version 3 of the EzPublish. I also installed the demo stuff. Now if you notice on the demo sites, when you go to the shop part, you can view the description of the files, you can also add to wish list, but you can not add to basket (Shopping Cart), or at least I can't figure out a way how to do it. I tried adding a product, but I could not find a way how to make it possible for users to ADD item to the basket. Any help would be greatly appreciated.

Thanks in advance,
Blu Cava

Bård Farstad

Wednesday 15 January 2003 1:35:22 am

> Ok guys.. here goes.. I have just installed the version 3 of
> the EzPublish. I also installed the demo stuff. Now if you
> notice on the demo sites, when you go to the shop part, you
> can view the description of the files, you can also add to
> wish list, but you can not add to basket (Shopping Cart), or
> at least I can't figure out a way how to do it. I tried
> adding a product, but I could not find a way how to make it
> possible for users to ADD item to the basket. Any help would
> be greatly appreciated.

That's a bug which was introduced just before the RC1 release. If you replace the contentActionList() function in kernel/classes/ezcontentobject.php with the code below it should work fine.

/*!
Returns an array of the content actions which can be performed on
the current object.
*/
function &contentActionList()
{
$version = $this->attribute( 'current_version' );
$language = $this->defaultLanguage();
if ( !isset( $this->ContentObjectAttributeArray[$version][$language] ) )
{
$this->ContentObjectAttributeArray[$version][$language] =& $this->contentObjectAttributes();
}

// Fetch content actions if not already fetched
if ( $this->ContentActionList === false )
{
$contentActionList = array();
foreach ( $this->ContentObjectAttributeArray[$version][$language] as $attribute )
{
$contentActions =& $attribute->contentActionList();
if ( count( $contentActions ) > 0 )
{
$contentActionList =& $attribute->contentActionList();

foreach ( $contentActionList as $action )
{
if ( !$this->hasContentAction( $action['action'] ) )
{
$this->ContentActionList[] = $action;
}
}
}
}
}
return $this->ContentActionList;
}

--bård

Documentation: http://ez.no/doc

sergey podlesnyi

Wednesday 15 January 2003 5:51:29 am

I have similar problem, in my case in one installation (Windows) my product pages showed "Add to cart" button correctly. I moved templates and database dump to Linux box and instead of "Add to cart" there appeared "Add to wishlist".

After I installed this Bård ' s patch "add to wishlist" disappeared but I still do not have "add to cart" button. Worst of all, it worked initially when I was designing on Windows laptop. EZ publish versions are the same (2.9.6)

I guess this is because my product "have run out of stock" somewhere in database but I can not find place in Admin interface where to fix availability of the product.

Bård, can you help?

>
> /*!
> Returns an array of the content actions which can be
> performed on
> the current object.
> */
> function &contentActionList()
> {
> $version = $this->attribute( 'current_version' );
> $language = $this->defaultLanguage();
> if ( !isset(
> $this->ContentObjectAttributeArray[$version][$language] )
> )
> {
>
> $this->ContentObjectAttributeArray[$version][$language] =&
> $this->contentObjectAttributes();
> }
>
> // Fetch content actions if not already fetched
> if ( $this->ContentActionList === false )
> {
> $contentActionList = array();
> foreach (
> $this->ContentObjectAttributeArray[$version][$language] as
> $attribute )
> {
> $contentActions =&
> $attribute->contentActionList();
> if ( count( $contentActions ) > 0 )
> {
> $contentActionList =&
> $attribute->contentActionList();
>
> foreach ( $contentActionList as $action
> )
> {
> if ( !$this->hasContentAction(
> $action['action'] ) )
> {
> $this->ContentActionList[] =
> $action;
> }
> }
> }
> }
> }
> return $this->ContentActionList;
> }
>
> --bård

Blu Cava

Wednesday 15 January 2003 7:35:36 am

Ok Bård.. thank you for your reply. I tried changing the content of the fucntion &contentActionList() but it still only shows Add to wish List, and New Review buttons. for some items it actually does not even show the add to wish list button. It only shows New Review button. Any other suggestions?

Thanks in advance.

BluCava
>
> That's a bug which was introduced just before the RC1
> release. If you replace the contentActionList() function in
> kernel/classes/ezcontentobject.php with the code below it
> should work fine.
>
> /*!
> Returns an array of the content actions which can be
> performed on
> the current object.
> */
> function &contentActionList()
> {
> $version = $this->attribute( 'current_version' );
> $language = $this->defaultLanguage();
> if ( !isset(
> $this->ContentObjectAttributeArray[$version][$language] )
> )
> {
>
> $this->ContentObjectAttributeArray[$version][$language] =&
> $this->contentObjectAttributes();
> }
>
> // Fetch content actions if not already fetched
> if ( $this->ContentActionList === false )
> {
> $contentActionList = array();
> foreach (
> $this->ContentObjectAttributeArray[$version][$language] as
> $attribute )
> {
> $contentActions =&
> $attribute->contentActionList();
> if ( count( $contentActions ) > 0 )
> {
> $contentActionList =&
> $attribute->contentActionList();
>
> foreach ( $contentActionList as $action
> )
> {
> if ( !$this->hasContentAction(
> $action['action'] ) )
> {
> $this->ContentActionList[] =
> $action;
> }
> }
> }
> }
> }
> return $this->ContentActionList;
> }
>
> --bård

sergey podlesnyi

Friday 17 January 2003 4:38:52 am

Hey Blu,

have you had a chance to resolve this problem - Add to cart button not displayed ? It looks like nobody wants to answer :-(

Thank you,

Sergey

eZ debug

Timing: Jan 18 2025 02:00:32
Script start
Timing: Jan 18 2025 02:00:32
Module start 'content'
Timing: Jan 18 2025 02:00:33
Module end 'content'
Timing: Jan 18 2025 02:00:33
Script end

Main resources:

Total runtime1.5089 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0080 587.7109180.8359
Module start 'content' 0.00801.3278 768.5469630.5625
Module end 'content' 1.33580.1730 1,399.1094341.3750
Script end 1.5088  1,740.4844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00480.3188210.0002
Check MTime0.00220.1481210.0001
Mysql Total
Database connection0.00120.078810.0012
Mysqli_queries1.370090.79752020.0068
Looping result0.00250.16652000.0000
Template Total1.456196.520.7280
Template load0.00270.177520.0013
Template processing1.453496.321620.7267
Template load and register function0.00010.009910.0001
states
state_id_array0.00280.186810.0028
state_identifier_array0.00170.114220.0009
Override
Cache load0.00270.17951740.0000
Sytem overhead
Fetch class attribute can translate value0.00170.113540.0004
Fetch class attribute name0.00370.247360.0006
XML
Image XML parsing0.00130.085940.0003
class_abstraction
Instantiating content class attribute0.00000.001160.0000
General
dbfile0.00640.4256280.0002
String conversion0.00000.000430.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs