"He then asked where the knives were," Vallette said.
Jurors were played CCTV footage as Vallette, a store floor manager, recalled the interaction.
The court heard Li also visited the firearms section.
Jurors were told Li showed Vallette a TradeMe ad for a similar knife, available online for a lower price.
Vallette said it soon emerged Li wanted a Buffalo River hunting knife, commonly used for chasing and stabbing pigs.
"You actually grab the pig and cut its throat," Vallette said.
He said Li also looked at machetes before choosing an $80 Gerber Steadfast hunting knife, which he bought for $65 after haggling.
CCTV footage played to jurors appeared to show Li examining the Gerber knife before paying cash.
The jury heard Li left at 12.04pm but returned within an hour, asking for a 15 per cent discount on a machete he'd earlier viewed.
Vallette said Li told him Mitre 10 had the machete for one cent cheaper.
Detective Constable Kate O'Mara from Henderson Police analysed CCTV footage and material allegedly found on Li's phone.
One video appeared to show Yang, 56, on Massey's White Heron Drive at about 8am on the day she died.
Other footage O'Mara said came from Li's phone was of the route a bus took down Granville Drive, Massey.
Prosecutors claim Li followed Yang before he attacked her as she waited for a bus on Westgate Drive, across the Northwestern Motorway from Granville Drive.
A car O'Mara believed to be Li's was seen driving behind Yang shortly after CCTV detected her walking down the road.
Jurors on Thursday also heard from Yang's former manager at Massey Library, Joanne Crummer.
"I think you guys deserve to know the truth about Jennifer," Li allegedly wrote in a letter on the front of a 20-page document dump he faxed to Crummer.
The manager said she declined to read the highly personal documents and told Yang.
Earlier on Thursday, Li's former flatmate Chloe Joyce said she was perplexed at suggestions she help him bargain for a knife shortly before the alleged murder.
"It just kind of freaked me out in a way," Joyce said.
Joyce told the court Li mostly talked about his past life in China, and obsessively complained about his ex-wife.
Li and Yang divorced in 2009.
The Crown alleges Li was obsessed with revenge after Yang, known as Jennifer, prevailed in a property dispute the couple had a few years earlier.
The trial continues.
Domestic violence - do you need help?
If you're in danger now:
• Phone the police on 111 or ask neighbours of friends to ring for you.
• Run outside and head for where there are other people.
• Scream for help so that your neighbours can hear you.
• Take the children with you.
• Don't stop to get anything else.
• If you are being abused, remember it's not your fault. Violence is never okay
Where to go for help or more information:
• Shine, free national helpline 9am- 11pm every day - 0508 744 633 www.2shine.org.nz
• Women's Refuge: Free national crisis line operates 24/7 - 0800 refuge or 0800 733 843 www.womensrefuge.org.nz
• Shakti: Providing specialist cultural services for African, Asian and middle eastern women and their children. Crisis line 24/7 0800 742 584
• It's Not Ok: Information line 0800 456 450 www.areyouok.org.nz