Skip to main content

Duplicate product creation on vendor product creation page

More
9 years 8 months ago #258716 by rfonta
-- 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

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

More
9 years 8 months ago #258728 by Jerome
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.

More
9 years 8 months ago #258753 by rfonta
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.

More
9 years 8 months ago #258757 by Jerome
Hi,

In the HikaMarket front-end product controller, please replace
Code:
JRequest::setVar('cid', null); return $this->listing();
By
Code:
$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.225 seconds
Powered by Kunena Forum