Show Posts


Messages - susinthiran

Pages: [1]
1
Hi,

Thank you!

I have implemented stock validation as you did in cart page before confirming order when user opts for cash on delivery!.

I think this is far better way to avoid product count getting negative.However I will lose second customer ofcourse.

In case of payment gateway I am analysing ways to implement validation.

Implementing lock for stock while adding to cart needs some analysis and I will definitely look at it.

Thanks for your suggestion and I am glad to know that solution will be available in version 2.



2
Hi,

I just want to get suggestion on following problem.

Assume if two user having same product in their cart and the product is having a count of 1.
If both users clicks confirms button the order gets placed but the product count goes to negative.

Any suggestions to avoid this?

Thanks in advance.

3
General Discussion / Re: Can't upload images via HTML code.
« on: May 08, 2018, 08:21:13 AM »

I have sorted out the problem and it was due to settings configurations(Seems like I either edited or deleted some settings).
When I tried to connect with old database which was used at initial stage there was no problem.

I will rectify that.
Thanks for your reply.

4
General Discussion / Re: Can't upload images via HTML code.
« on: May 08, 2018, 07:16:30 AM »
I tried in Mozilla Firefox and the result is same(previously I tried with Google chrome).
I am running it locally and my Operating system is Windows 7 Professional.
I am using Apache 2.4.23 Webserver.

The Abantecart Version is 1.2.11.



5
General Discussion / Re: Can't upload images via HTML code.
« on: May 08, 2018, 05:45:03 AM »
Hi,

No,Its not getting mapped instead empty image is added with all fields being empty.

6
General Discussion / Can't upload images via HTML code.
« on: May 08, 2018, 01:24:58 AM »
Hi,

I am running abantecart locally and while I am trying to map resource via Html for Products it is not getting mapped and all it does is mapping an empty image.

If I am right,the problem is relating to settings.

Any suggestions to overcome this problem?

Thanks in Advance.

7
Templates / Re: Config settings overridden by Newly created template.
« on: March 14, 2018, 03:38:00 AM »
Hi,

Thank you for response.

Will update to latest one.

8
Templates / Re: Config settings overridden by Newly created template.
« on: March 14, 2018, 02:06:41 AM »
Hi,

The version of Developer tools I am using is 1.2.0

9
Templates / Config settings overridden by Newly created template.
« on: March 14, 2018, 01:23:34 AM »
Hi,

I have created a new template using Developer tools inside root template folder and now I copied the code and replaced with Default template after some changes in new template.
Now I could see the config settings for New template is overriding the settings of default template.So,whatever changes I made for Default template is not affecting in front end.

Any workaround for this?

Or we need to create new template only under extension folder since it is skipping the values in column Group in settings table which is same as values in column Key in extension table while fetching settings.

Thanks in Advance.

10
Hi,

Thank you,It is good idea indeed :).

I knew that instance_id is changed each time when layout has been saved.
I may need to write query for that to fetch instance_id by passing block_id.
That's why I chose to go with instance_id as it is fetched from blocks_layouts table on calling buildPageData() function.(That's how it works in web interface.)
However,I fetched banner images via Admin function.(The function which is used to populate list in banner_manager interface.)

can't we get instance_id from another file through hooking?

11
Hi,

Thank you for reply.

Actually when I tried, I am getting error as call to member function getInstance() on null.
I can't find out the way to rectify it.

I have added my file here.
If i could get instance_id I can get banner_list.
Sorry I can't understand hook concept and how to use it.

class ControllerApiCommonBlocksBannerBlock extends AControllerAPI {

    protected $registry;

    public function onControllerBlocksBannerBlock_InitData()
    {
        $this->registry = Registry::getInstance();
        $instance_id = $this->baseObject->getInstance();
        //var_dump($instance_id);
    }

    public function get() {
        $this->extensions->hk_InitData($this,__FUNCTION__);


        $request = $this->rest->getRequestParams();
        $controller="pages/index/home";
        $this->layout->buildPageData($controller);
        $instance_id=""; //have to get through hooking

        $response=$this->getBlockContent($instance_id);
        $this->extensions->hk_UpdateData($this,__FUNCTION__);

        $this->rest->setResponseData( $response );
        $this->rest->sendResponse( 200 );
    }

    public function getBlockContent($instance_id) {
        $block_info = $this->layout->getBlockDetails($instance_id);
        $custom_block_id = $block_info['custom_block_id'];
        $this->loadModel('extension/banner_manager');
        $results = $this->model_extension_banner_manager->getBanners($custom_block_id);
        $banners = array();
        if($results){
            $rl = new AResource('image');
            foreach($results as $row){
                if($row['banner_type']==1){ // if graphic type
                    /**
                     * @var array
                     */
                    $row['images'] = $rl->getResourceAllObjects('banners',$row['banner_id']);
                    //add click registration wrapper to each URL
                    //NOTE: You can remove below line to use tracking javascript instead. Javascript tracks HTML banner clicks
                    $row['target_url'] = $this->html->getURL('r/extension/banner_manager/click', '&banner_id='.$row['banner_id'], true);

                } else {
                    $row['description'] = html_entity_decode($row['description']);
                }
                $banners[] = $row;
            }
        }
        $output = array(
            'content' => $banners
        );

        return $output;
    }

}



12
API Development / Facing issues while collecting banner images via API
« on: February 28, 2018, 06:01:23 AM »
Hi,

I was trying to get banner images via mobile API and created an API for that.
Based on my understanding in  blocks/banner_block.php  it is calling func_get_arg(0) to get instance_id(It is returning exact instance_id what it has been saved in block_layouts_table for banner_block).

When I try it from my PHP file it is saying Argument 0 is not passed to func_get_arg.I think controller is playing role here.

Is it possible to get same instance_id what we get in banner_blocks.php file into my file?

Thanks in Advance.

13
Support / Re: Connecting Oracle database.
« on: October 12, 2017, 07:53:58 AM »
Hi,

Thank you for helping out and making things clear.

Looking forward for v2.0.

14
Support / Connecting Oracle database.
« on: October 12, 2017, 03:21:58 AM »
Hi,
I have just set up AbanteCart locally in my system.
Feeling grateful to have AbanteCart as it is having lot of features.
I just want to clarify few things.

 1.Is it possible to use Oracle database as backend?.
 2.Is there is any ORM used?.

Sorry, as I am new to php I could not make myself clear regarding ORM existence.

Kindly help me with this.

Thanks in advance.


Pages: [1]

Powered by SMFPacks Social Login Mod