Duplicate product creation on vendor product creation page

  • Posts: 105
  • Thank you received: 2
7 years 10 months ago #258716

-- HikaMarket version -- : 1.6.7

Hello,
when a vendor creates a product and then refreshes the product list page (see image enclosed where you can see twice the same products; id id that 2 times in that case) the product is created again.
What is the best way to solve this?

Kind regards
Richard

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 10 months ago #258728

Hi,

When the user refresh the page he re-submit the product creation form.
It could be possible to use a "post redirect" trick in order to avoid the form re-submission but it will require to modify the HikaShop core to do so.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 105
  • Thank you received: 2
7 years 10 months ago #258753

Hello,

thanks for the answer; I understand the issue, but shouldn't this type of behaviour be prevented by the application natively??

I don't know very well enough the core to do myself the modification; could you please instruct a bit?

regards

Richard

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 10 months ago #258757

Hi,

In the HikaMarket front-end product controller, please replace

		JRequest::setVar('cid', null);
		return $this->listing();
By
		$app = JFactory::getApplication();
		$app->redirect( hikamarket::completeLink('product&task=listing', false, true) );
		return false;
And it should do the trick.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.069 seconds
Powered by Kunena Forum