Jump to:

2088 Posts in 1007 Topics by 455 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Working on e-commerce for SS 2.4

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 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Go to End
Author Topic: 13293 Views
  • mattconfusion
    Avatar
    Community Member
    48 Posts

    Re: Working on e-commerce for SS 2.4 Link to this post

    hi jeda one question. I'm trying to extend the product page, in a way similar to the one showed in tutorial 2 (when it's extending page). The table is correctly cerated, the php file is placed in mysite folder, but on the cms it's not working, calling it a product page in the create dropdown, and not showing any of the fields I added (for now, Checkboxfield and textfield)... any suggestions? It would be source of problems doing that?

    <?php

    class Agenda extends Product {

    static $db = array(
    'Ricambiabile' => 'Boolean',
    'NumeroFogli' => 'Int'
    );

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

    $fields->addFieldToTab('Root.Content.Main', new CheckboxField('Ricambiabile'), _t('Agenda.RICAMBIABILE', 'Carta Ricambiabile'));
    $fields->addFieldToTab('Root.Content.Main', new TextField ('NumeroFogli', _t('Agenda.NUMEROFOGLI', 'Product Code'), '', 4),'Content');

    return $fields;
    }.
    }
    ?>

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: Working on e-commerce for SS 2.4 Link to this post

    Where is invoice link on CMS backend?

  • mattconfusion
    Avatar
    Community Member
    48 Posts

    Re: Working on e-commerce for SS 2.4 Link to this post

    it's in the reports - all orders rows

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: Working on e-commerce for SS 2.4 Link to this post

    Hi mattconfusion,

    after update a class, you must launch /dev/build?flush=1

    PS: could you contact me on my mail ( see my profile )?

  • mattconfusion
    Avatar
    Community Member
    48 Posts

    Re: Working on e-commerce for SS 2.4 Link to this post

    done it, but seems to be not working.
    i will contact you but right now i'm gonna leave so it would be tomorrow morning, sorry pal.

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: Working on e-commerce for SS 2.4 Link to this post

    Hi,

    Example:
    class News extends Page {

    public static $db = array(
    'DataNews' => 'Date'
    );

    static $has_one = array(
    'NewsBanner1' => 'News_Image',

    );

    /**
    * Create the fields within the CMS
    */
    function getCMSFields() {
    $fields = parent::getCMSFields();

    $fields->addFieldToTab("Root.Content.Main", new CalendarDateField("DataNews", "Data"));
    $fields->addFieldToTab("Root.Content.Images", new ImageField("NewsBanner1", "Immagine News"));
    return $fields;

    }

    }

    I see, in you code "}." Is dot a mistake? You must del it.
    PS: Matt, I'm italian like you. On my site , you find my contacs ( MSN too ).

  • mattconfusion
    Avatar
    Community Member
    48 Posts

    Re: Working on e-commerce for SS 2.4 Link to this post

    actually your code is running, but it's my approach it's incorrect. I'm basically trying to have more customized types of products. a simple extension like the one we have been talking about since now, gives you

    [User Warning] ModelAsController::getNestedController() returned bad object type 'ACertainProduct'

    (where a certain product is obiviosly the product extension) .

    What would be the correct approach to extend the Product Object to make it still recognizable as a product with additional features? In addition to this, an extension like the one posted above gives you, in the dropdown menu of ?create Page'the Product title again. So even if you extended it, it still appears as another Product type page

    @biapar: yeah I know you're italian ; ) don't have msn in this place but if you want i made visible my email address too

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: Working on e-commerce for SS 2.4 Link to this post

    Hi,

    the approach of extend "class Agenda extends Product" is ok.
    Have you that error because you made agenda child of agenda?

    13293 Views
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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.