Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

E-Commerce Modules /

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

SS - Shop: A number of Important Issues (Request for assistance)


Reply


6 Posts   928 Views

Avatar
ocean

Community Member, 37 Posts

3 September 2013 at 7:59am

Edited: 05/09/2013 12:45am

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

Avatar
ocean

Community Member, 37 Posts

5 September 2013 at 12:44am

Edited: 05/09/2013 12:50am

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?!?

Avatar
Jedateach

Forum Moderator, 232 Posts

22 January 2014 at 10:06am

Hi ocean,

I've just [url=https://github.com/burnbright/silverstripe-shop/commit/39a52a1b13b6bfbe73033ddba9de9120a8dfeaf8]removed that getCMSFields[/url] 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.

Avatar
ocean

Community Member, 37 Posts

24 January 2014 at 1:12am

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

Avatar
Jedateach

Forum Moderator, 232 Posts

27 January 2014 at 9:05am

Hi ocean, that particular issue should be resolved now.

Avatar
ocean

Community Member, 37 Posts

29 January 2014 at 12:12am

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 : )