Show Posts


Messages - yonghan79

Pages: [1] 2
1
Thanks abolabo. I will try it.

2
Hi core devs,

I am using trying to add some product info in cart lib by using the
Code: [Select]
onACart_ProccessData() and the method is
Code: [Select]
ACart::buildProductDetails
I also hook into storefront product page by using
Code: [Select]
onControllerPagesProductProduct_UpdateData

I pass the additional data by using
Code: [Select]
$that->view->batchAssign( $this->data ); and using
Code: [Select]
$that->processTemplate( 'pages/xxxx/xxxx.tpl' );
When i open the product page i get
Code: [Select]
Unknown Error:  AbanteCart core v.1.3.0 Call to a member function batchAssign() on null and
Code: [Select]
Unknown Error:  AbanteCart core v.1.3.0 Call to undefined method ACart::processTemplate()
I wonder if i missed anything in my code?

Thanks

3
API Development / Re: Get cust data in lib/cart.php
« on: April 30, 2021, 08:51:26 PM »
Thanks abolabo. I will do some more testing to understand better.

4
API Development / Re: Get cust data in lib/cart.php
« on: April 30, 2021, 09:07:07 AM »
Thanks abolabo.
about the ['total_text_id'=>$extn] ? What it is used for?

5
API Development / Re: Get cust data in lib/cart.php
« on: April 30, 2021, 06:08:35 AM »
I am testing the ACart_ProcessData but i don't know how to add data to that hook. What is the ['total_text_id' => $extn] used for?

Do you mind giving me an example?

6
API Development / Re: Get cust data in lib/cart.php
« on: April 30, 2021, 06:01:08 AM »
Code: [Select]
foreach ($total_extns as $extn) {
            $sf_total_mdl = $this->load->model('total/'.$extn['key'], 'storefront');
            /**
             * parameters are references!!
             *
             * @var ModelTotalTotal $sf_total_mdl
             */
            $sf_total_mdl->getTotal($total_data, $total, $taxes, $this->cust_data);
            //trick to change data via hooks
            $this->data = [
                'total_key'  => $extn['key'],
                'total_data' => $total_data,
                'total'      => $total,
                'taxes'      => $taxes,
            ];
            $this->registry->get('extensions')->hk_ProcessData($this, __FUNCTION__, ['total_text_id' => $extn]);

            $total_data = $this->data['total_data'];
            $total = $this->data['total'];
            $taxes = $this->data['taxes'];
            unset(
                $this->data['total_key'],
                $this->data['total_data'],
                $this->data['total'],
                $this->data['taxes']
            );
            $sf_total_mdl = null;
        }

I see there is //trick to change data via hooks.

7
API Development / Re: Get cust data in lib/cart.php
« on: April 30, 2021, 05:49:48 AM »
Got it, i will do some more testing.

Another question. I see there is
Code: [Select]
$this->registry->get('extensions')->hk_ProcessData($this, __FUNCTION__, ['total_text_id' => $extn]); within the cart.php too.

How do i use it?

8
API Development / Re: Get cust data in lib/cart.php
« on: April 30, 2021, 05:34:28 AM »
Thanks abolabo, i will learn about them first. I will ask again if i don't understand.

I wonder if it's possible to change the protected cust_data become public cust_data in the cart.php?

9
API Development / Get cust data in lib/cart.php
« on: April 29, 2021, 08:42:19 PM »
Hi core devs,

I wonder if we can get/set the cust_data within the lib/cart.php via hook?

I want to add some info in add and buildProductDetails from admin side.

Thanks.

10
Built-in Features / Re: Local Delivery
« on: September 14, 2020, 08:56:39 PM »
Hi,

We have added the ability for admins to use asterisk/wildcard for the post codes such as SN*, 35* etc. So admin doesn't have to enter the post code one by one anymore. And it is not case sensitive, so when customer enter sn1, the local delivery rate is shown.

And we have create a pull request here https://github.com/abantecart/abantecart-src/pull/1424 in github.

Changes made by WHY2 Support for AbanteCart.


11
General Support / Re: Error in logs file after 1.2.16 upgrade
« on: August 16, 2020, 11:50:27 PM »
Hi Hani,

Based on your error log, i found out the warning message is caused by our Editor extension.

Have you update the extension version?

Can you please create a support ticket via our support system at https://wehearyou2.com/clientarea/client/login/ so we can fix it for you?

Thanks.

WHY2 Support Team

12
Hi,

Today I tried several ways of installing one of our extensions, AddThis in AbanteCart v1.2.15. 
The originating files are set to 0644 and the folders are set to 0755.
1. Installing via FTP with our original files from our development the files remain set to 0644 and folders to 0755.
2. Installed via Extensions Upload (after downloading the files to a PC from MarketPlace) the files remain set to 0644 and folders to 0755.
3. Installing via a key the files and the folders are set to 0777.

13
No it's not, but the product relation, select brand within brand listing block etc.

14
Suggestions for a change in Autocomplete -  we've  found out that the minimum char to trigger the ajax-chosen autocomplete to start working is 3 char, i suggest to make it 2, as there are some cases that admin might sell a brand that has only 2 char such as 3M. Leave the time delay, it's fine.

The file is admin/view/default/template/form/chosen_select.tpl.

Thanks

Support Team at WHY2

15
API Development / Re: how to load model from other controller?
« on: March 01, 2019, 12:49:15 AM »
You're welcome

Pages: [1] 2

Powered by SMFPacks Social Login Mod