Jump to content

Implemented one module in another ? (Presta 1.6)


Recommended Posts

I would like to know how to graft a module into another module. More clearly :
I have a marketplace module on my site, and I would like on a page of this marketplace, to put a donation module that I have too. Via the hooks, it is impossible for me to choose precisely the page or I want to display it. If I copy / paste the code as a pig, I have errors (logical) including one that says "undefined index $ allow_oosp"

Here is the code of the module of donation which interests me, basically there is an input and a button add to the basket which adds the "product" gift after having entered in the input the wished sum (1 quantity = 1 €)

<Div>
<! - quantity wanted ->

<p id = "quantity_wanted_p" {if (! $ allow_oosp && $ product-> quantity <= 0) || ! $ product-> available_for_order || $ PS_CATALOG_MODE} style = "display: none;" {/ if}>

                      <! - <label for = "quantity_wanted"> {l s = 'Donate what you want (enter an amount without cents)' mod = 'donate'} </ label> ->
<input type = "price" min = "1" name = "qty" id = "quantity_wanted" style = "font-size: 22px; padding: 6px 12px; border: 1px solid # B0AFAF; border-radius: 4px; width 100%; max-width: 250px; height: inherit; " class = "text" value = "1 {$ currency-> sign | escape: 'htmlall': 'UTF-8'}" />
<span class = "clearfix"> </ span>
</ P>

<! - minimal quantity wanted ->
<p id = "minimal_quantity_wanted_p" {if $ product-> minimal_quantity <= 1 || ! $ product-> available_for_order || $ PS_CATALOG_MODE} style = "display: none;" {/ if}>
</ P>

</ div> <! - end product_attributes ->
<div class = "box-cart">
<div {if (! $ allow_oosp && $ product-> quantity <= 0) || ! $ product-> available_for_order || (isset ($ restricted_country_mode) && $ restricted_country_mode) || $ PS_CATALOG_MODE} class = "unvisible" {/ if}>
<p id = "add_to_cart" class = "buttons_bottom_block no-print" style = "padding: 0;">
<button type = "submit" name = "Submit" class = "exclusive">
<span> {if $ content_only && (isset ($ product-> customization_required) && $ product-> customization_required)} {ls = 'Customize' mod = 'donate'} {else} {ls = 'Donate' mod = 'donate '} {/ if} </ span>
</ Button>
</ P>
</ Div>
</ div> <! - end box-cart-bottom ->

Thank you for your answers to all :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...