Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[-] BO : update link preview in js when product change publish #5220

Merged

Conversation

@cocoweb94
Copy link
Contributor

commented Mar 21, 2016

Description

change link preview when product change condition publish

Steps to Test this Fix

  1. change condition publish
  2. click on button preview
  3. if product is offline , link will have the token , admin dir and id employee

Forge Ticket (optional)

BOOM-316

@mickaelandrieu

View changes

admin-dev/themes/default/js/bundle/product/form.js Outdated
send();
});
$('#form_step1_active', elem).on('change', function() {
var active = $(this).prop('checked');

This comment has been minimized.

Copy link
@mickaelandrieu

mickaelandrieu Mar 21, 2016

Member

indentation please :)

@@ -1008,6 +1008,7 @@
</a>
<a
data-redirect="{{ preview_link }}"
data-url_deactive="{{ preview_link_deactivate }}"

This comment has been minimized.

Copy link
@mickaelandrieu

mickaelandrieu Mar 21, 2016

Member

I'd like to see data-url-deactivate instead, what do you think ?

$context = \ContextCore::getContext();
$token = \ToolsCore::getAdminTokenLite('AdminProducts');

$admin_dir = dirname($_SERVER['PHP_SELF']);

This comment has been minimized.

Copy link
@mickaelandrieu

mickaelandrieu Mar 21, 2016

Member

uhuh ^^ what do you expect ? did you take a look at the available constants in defines.inc.php file ?

@Shudrum how about use Link::getProduct() instead ?

@cocoweb94 cocoweb94 force-pushed the cocoweb94:changePreviewurlPublish branch Mar 21, 2016

@cocoweb94 cocoweb94 force-pushed the cocoweb94:changePreviewurlPublish branch to 241b993 Mar 21, 2016

@vincentbz

This comment has been minimized.

Copy link
Contributor

commented Mar 21, 2016

Testé et ok, merci!

@vincentbz vincentbz added the QA ✔️ label Mar 21, 2016

@mickaelandrieu mickaelandrieu merged commit 8c27e0d into PrestaShop:develop Apr 14, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@mickaelandrieu

This comment has been minimized.

Copy link
Member

commented Apr 14, 2016

Thank you @cocoweb94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.