Jump to:

2081 Posts in 1001 Topics by 452 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » SS - Shop: A number of Important Issues (Request for assistance)

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 705 Views
  • ocean
    Avatar
    Community Member
    37 Posts

    SS - Shop: A number of Important Issues (Request for assistance) Link to this post

    I've Installed SS-Shop with the following setup:

    SS V3.0.5
    SS Shop V1.0
    SS Payment V1.0

    And mostly things are working OK except some pretty important issues which I've so far been unable to resolve through either the documentation, this forum, or my own trial and error. So I'm seeking here for some help. Problems as follows:

    - Error on saving of product (SOLVED) (appears to be actually saving changes into database but throws an error in 'dev' mode and causes blank screen in 'live' mode)

    Line 580 in /home/idealede/public_html/framework/model/MySQLDatabase.php
    Source
    571    }
    572
    573    public function databaseError($msg, $errorLevel = E_USER_ERROR) {
    574       // try to extract and format query
    575       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
    576          $formatter = new SQLFormatter();
    577          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
    578       }
    579
    580       user_error($msg, $errorLevel);
    581    }

    - Products not showing up in the selected categories either in CMS or frontend (Product Category Pages) as set up in 'managed model' CMS tabs. Which means A. Everything has to be managed manually in site tree i.e. dragging things about to make desired structure (not fun!) and B. Impossible to have products in multiple categories (as checked in managed model categories setup), again, a bit restrictive and not intended functionality on site.

    - Account Page does not seem to be functioning properly, unable to access purchase history and associated info or update details.

    Any help to solve either one or all of the above is greatly appreciated, and would no doubt help others setting up similar sites.

    Many Thanks
    ~ Sean

  • ocean
    Avatar
    Community Member
    37 Posts

    Re: SS - Shop: A number of Important Issues (Request for assistance) Link to this post

    UPDATE

    - Issue one solved (Error on saving of product) There was an image already defined in 'page' which was clashing with the image defined in 'product'
    - Issue two still a problem; the category selection in product is having no discernible effect, in delving I discovered these:

    ProductCategory.php

    function getCMSFields() {
          $fields = parent::getCMSFields();

          if(self::$include_child_groups === 'custom'){
             $fields->addFieldToTab(
                'Root.Content',
                new Tab(
                   'Child Groups',
                   new HeaderField('How should products be presented in the child groups?'),
                   new DropdownField(
                       'ChildGroupsPermission',
                       'Permission',
                       $this->dbObject('ChildGroupsPermission')->enumValues(),
                       '',
                       null,
                       'Don\'t Show Any Products'
                   )
                )
             );
          }

    Not sure what 'custom' is referring to, any ideas?

    And also...

    Product.php

       /**
        * Helper for creating the product groups table
        */
       protected function getProductCategoriesTable() {
          //TODO: SS3 has no support for GridField many_many, get more info
          $productCategories = DataObject::get("ProductCategory");
          $itemsTable = new CheckboxSetField("ProductCategories","Product Categories",$productCategories->map("ID", "Title"));
          
          return $itemsTable;
       }

    Which may have some influence in terms of available setup?!?

  • Jedateach
    Avatar
    Forum Moderator
    227 Posts

    Re: SS - Shop: A number of Important Issues (Request for assistance) Link to this post

    Hi ocean,

    I've just removed that getCMSFields code you've mentioned. It was a configuration that would enable admins to choose to 'only show featured products' or 'show all products' in the current category. This functionality could be re-added via an extension, if someone really wants it.

    That Product categories table has been replaced recently with a single field. Should be easy to find if you update.

    I think your other issues will be sorted if/when you upgrade to the latest code. It is relatively stable, but changes are still being made before a proper 1.0-beta, then final 1.0 release.

  • ocean
    Avatar
    Community Member
    37 Posts

    Re: SS - Shop: A number of Important Issues (Request for assistance) Link to this post

    Thanks Jeremy!

    Unfortunately I still cannot get this functionality working at all.

    I decided to do a fresh install local to test, before doing anything with main project. Using SS 3.1.2, shop, omipay and all dependencies using composer, and no custom settings all just 'out of the box' on WAMP with PHP 5.4.*

    After this:

    Create product, assign category through UI, set featured, then set a price.
    (flush cache etc)

    I get this:

    When I go to front end and click category page there is a server error.
    If I remove the price the category page loads but obviously no product present.

    Debug info:

    [User Error] Uncaught Exception: Object->__call(): the method 'get_sort_options' does not exist on 'ProductCategory_Controller'

    Trace

    Object->__call(get_sort_options,Array)
    ProductCategory.php:138
    ProductCategory_Controller->get_sort_options()
    ProductCategory.php:138
    ProductCategory_Controller->SortLinks()
    ViewableData.php:363
    ViewableData->obj(SortLinks,,,1,)
    ViewableData.php:403
    ViewableData->cachedCall(SortLinks,)
    ViewableData.php:416
    ViewableData->hasValue(SortLinks,,1)
    call_user_func_array(Array,Array)
    SSViewer.php:178
    SSViewer_Scope->__call(hasValue,Array)
    SSViewer.php:524
    SSViewer_DataPresenter->__call(hasValue,Array)
    .cache.myshop.templates.Layout.ProductCategory.ss:48
    SSViewer_DataPresenter->hasValue(SortLinks,,1)
    .cache.myshop.templates.Layout.ProductCategory.ss:48
    include(C:\Windows\Temp\silverstripe-cacheC--wamp-www-sslatest3.1withshop\SHAONE-PC\.cache.myshop.templates.Layout.ProductCategory.ss)
    SSViewer.php:952
    SSViewer->includeGeneratedTemplate(C:\windows\TEMP\silverstripe-cacheC--wamp-www-sslatest3.1withshop\SHAONE-PC/.cache.myshop.templates.Layout.ProductCategory.ss,ProductCategory_Controller,,Array,)
    SSViewer.php:1019
    SSViewer->process(ProductCategory_Controller,)
    SSViewer.php:1015
    SSViewer->process(ProductCategory_Controller)
    Controller.php:203
    Controller->handleAction(SS_HTTPRequest,index)
    RequestHandler.php:200
    RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
    Controller.php:153
    Controller->handleRequest(SS_HTTPRequest,DataModel)
    ContentController.php:197
    ContentController->handleRequest(SS_HTTPRequest,DataModel)
    ModelAsController.php:76
    ModelAsController->handleRequest(SS_HTTPRequest,DataModel)
    Director.php:360
    Director::handleRequest(SS_HTTPRequest,Session,DataModel)
    Director.php:152
    Director::direct(/cat1/,DataModel)
    main.php:189

  • Jedateach
    Avatar
    Forum Moderator
    227 Posts

    Re: SS - Shop: A number of Important Issues (Request for assistance) Link to this post

    Hi ocean, that particular issue should be resolved now.

  • ocean
    Avatar
    Community Member
    37 Posts

    Re: SS - Shop: A number of Important Issues (Request for assistance) Link to this post

    Awesome, thanks for that Jedatech!

    Just updated my localhost with new version and all is now working ticketyboo in the category/products dept, much appreciated : )

    705 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.