Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: return_url in store get the full url instead of the lang prefix

Status Resolved
Add-on / Version Publisher 2.9.0
Severity
EE Version 3.4.3

Service Desk

Sep 12, 2018

Hi there,

When using store and having the product tag as follow.

[exp:store:product
entry_id="4”
  return=“store/checkout”
  class=“store_product_form”
]

the tag should produce the following return url HTML

<input type="hidden" name="return_url" value="store/checkout">
<input type="hidden" name="RET" value="store/category/koken-en-tafelen/5/bord-nista-225-cm/">

But instead of doiging that it produce this

<input type="hidden" name="return_url" value="http://mbv.portalserver.nl/nl/store/checkout">
<input type="hidden" name="RET" value="nl/store/category/koken-en-tafelen/5/bord-nista-225-cm/">

Where the RET param seems to parse the correct prefix, but the return_url add the site_url. That is wrong and it should only add the prefix url. Store does not know how to handle the full url and i get this url http://mbv.portalserver.nl/http://mbv.portalserver.nl/nl/store/checkout

Can you guide me how to change the behaviour how to change the return_url to just add the prefix url. It seems that it is handled in cms/system/user/addons/publisher/Service/Parser.php::replaceFormVariables() on line 425

Let me know.

Best,
Rein

 

 

 

#1

BoldMinded (Brian)

You may have to data-publisher-ignored=”yes” to the form as noted in the docs http://docs.boldminded.com/publisher/template-tags, then set the return param manually:

return="{publisher:current_language_code}/store/checkout"
#2

Dunique

Hi Brian,

Do you mean on the <form> tag? As the <form> is generated by the store module. Adding data-publisher-ignored=“yes” to the tag does not work…

Let me know how i can handle this.

Best, Rein

#3

BoldMinded (Brian)

Yeah, it needs to be on the <form> tag. Usually those modules have a parameter to add extra attributes, e.g. extra=”data-publisher-ignored=’yes’”

You’re not the first one to use Store and Publisher together, so I’m wondering why this is an issue now.

#4

Dunique

Ok, i see that store use extra:data-publisher-ignored=”yes” for extra attributes.

Case closed.

Login to reply