Forums / General Questions / Adding product model in different places...

Adding product model in different places...

Views: 822

Results 1 to 11 of 11
10 Nov 2015, 8:49 PM
#1
toomanyknots avatar

toomanyknots

Zen Follower

Join Date:
Jun 2014
Location:
hamilton, ohio
Posts:
100
Plugin Contributions:
0

Adding product model in different places...

I added the product model to my right side info of the product info page by adding this code:

<!--bof model -->
<id="modelproductinfo"><?php echo TEXT_PRODUCT_MODEL . $products_model; ?>

I am wondering how to make this not stack, like it says "model", and then says the model underneath. You can see what I mean here:

http://www (DOT) oldworldarchery (DOT) com/DEVELOPMENT/index.php?main_page=product_info&cPath=138_16_142_17&products_id=351

I would rather it say: model: [model example] instead of putting the model underneath the word "model".

...man i just said the word model a lot, lol.

14 Nov 2015, 5:03 PM
#2
toomanyknots avatar

toomanyknots

Zen Follower

Join Date:
Jun 2014
Location:
hamilton, ohio
Posts:
100
Plugin Contributions:
0

Re: Adding product model in different places...

Bump for hope

15 Nov 2015, 7:52 AM
#3
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Adding product model in different places...

toomanyknots:

I added the product model to my right side info of the product info page by adding this code:

<!--bof model -->

<id="modelproductinfo"><?php echo TEXT_PRODUCT_MODEL . $products_model; ?>

> 
> I am wondering how to make this not stack, like it says "model", and then says the model underneath. You can see what I mean here:
> 
> <http://www> (DOT) oldworldarchery (DOT) com/DEVELOPMENT/index.php?main_page=product_info&cPath=138_16_142_17&products_id=351
> 
> I would rather it say: model: [model example] instead of putting the model underneath the word "model".
> 
> ...man i just said the word model a lot, lol.


Try this

<div id="modelproductinfo"><?php echo TEXT_PRODUCT_MODEL ; ?> <?php echo $products_model ; ?></div> ```

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

15 Nov 2015, 3:07 PM
#4
toomanyknots avatar

toomanyknots

Zen Follower

Join Date:
Jun 2014
Location:
hamilton, ohio
Posts:
100
Plugin Contributions:
0

Re: Adding product model in different places...

frank18:

Try this

<div id="modelproductinfo"><?php echo TEXT_PRODUCT_MODEL ; ?> <?php echo $products_model ; ?></div> ```

Hmm, I get the same results, but it now has the same text properties as the product name.

15 Nov 2015, 6:24 PM
#5
lruskauff avatar

lruskauff

Totally Zenned

Join Date:
Sep 2008
Location:
WA
Posts:
559
Plugin Contributions:
0

Re: Adding product model in different places...

Are you refreshing your cache? On my iPad, I see it all on one line.

Lruskauff

15 Nov 2015, 11:39 PM
#6
toomanyknots avatar

toomanyknots

Zen Follower

Join Date:
Jun 2014
Location:
hamilton, ohio
Posts:
100
Plugin Contributions:
0

Re: Adding product model in different places...

lruskauff:

Are you refreshing your cache? On my iPad, I see it all on one line.

Lruskauff

Hmm, yes it still is stacking for me. By the way, I am messing with the color scheme, it looks totally funky right now so sorry for the ugliness, :).

15 Nov 2015, 11:58 PM
#7
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Adding product model in different places...

toomanyknots:

Hmm, yes it still is stacking for me. By the way, I am messing with the color scheme, it looks totally funky right now so sorry for the ugliness, :).

Please post the top part of your templates/apon_black/templates/tpl_product_info_display.php file for us to have a look at.

Need the part from <!--bof Product Price block --> to <!--eof Attributes Module -->

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

16 Nov 2015, 5:09 PM
#8
lruskauff avatar

lruskauff

Totally Zenned

Join Date:
Sep 2008
Location:
WA
Posts:
559
Plugin Contributions:
0

Re: Adding product model in different places...

toomanyknots:

Hmm, yes it still is stacking for me. By the way, I am messing with the color scheme, it looks totally funky right now so sorry for the ugliness, :).

Sorry, I was looking at that information under details. If I view your source I see this:

<!-- bof show product model in right side info -->
<id="modelproductinfo">Model: <br /><span class="smallText">[allen nocking pliers]</span><!-- eof show product model in right side info -->

Notice the <br/>

See how TEXT_PRODUCT_MODEL is defined (i.e. does it contain the new line code)

16 Nov 2015, 5:38 PM
#9
toomanyknots avatar

toomanyknots

Zen Follower

Join Date:
Jun 2014
Location:
hamilton, ohio
Posts:
100
Plugin Contributions:
0

Re: Adding product model in different places...

frank18:

Please post the top part of your templates/apon_black/templates/tpl_product_info_display.php file for us to have a look at.

Need the part from <!--bof Product Price block --> to <!--eof Attributes Module -->

Sorry for being so slow to reply. The <!-- bof show product model in right side info --> is what I added to show the product model in the right side info, here you go:

<!--bof Product Price block -->
<h2 id="productPrices" class="productGeneral">
<?php
// base price
  if ($show_onetime_charges_description == 'true') {
    $one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
  } else {
    $one_time = '';
  }
  echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : TEXT_PRODUCT_PRICE_LABEL) . zen_get_products_display_price((int)$_GET['products_id']);
?></h2>
<!--eof Product Price block -->

<!-- bof show product model in right side info -->
<id="modelproductinfo"><?php echo TEXT_PRODUCT_MODEL . $products_model; ?>
<!-- eof show product model in right side info -->

<!--bof Attributes Module -->
<?php 
  if ($pr_attr->fields['total'] >0) {
?>
<?php
/**
 * display the product atributes
 */
  require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?>
<?php
  }
?>
<!--eof Attributes Module -->
16 Nov 2015, 6:53 PM
#10
lruskauff avatar

lruskauff

Totally Zenned

Join Date:
Sep 2008
Location:
WA
Posts:
559
Plugin Contributions:
0

Re: Adding product model in different places...

Two things

  1. What is defn of TEXT_PRODUCT_MODEL (found in language file)
  2. Go up in the code and see where $products_models is defined. My guess is that there is where the <br> tag is added.

lruskauff

16 Nov 2015, 11:24 PM
#11
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Adding product model in different places...

toomanyknots:

Sorry for being so slow to reply. The <!-- bof show product model in right side info --> is what I added to show the product model in the right side info, here you go:

....

<!--eof Product Price block --> <!-- bof show product model in right side info -->

<id="modelproductinfo"><?php echo TEXT_PRODUCT_MODEL . $products_model; ?>

<!-- eof show product model in right side info --> <!--bof Attributes Module -->

That <id="modelproductinfo"> does nothing - try

<!--eof Product Price block --> <!-- bof show product model in right side info -->

<div id="modelproductinfo"><?php echo TEXT_PRODUCT_MODEL ;?> <?php echo $products_model ;?></div>

<!-- eof show product model in right side info --> <!--bof Attributes Module -->

and in your stylesheet add this

#modelproductinfo {

your_styling_ goes_here;

}

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.