Elxis CMS Forum

Extensions => Templates => Topic started by: yiannisK on March 23, 2011, 10:57:46

Title: Dynamic divs in IOS eShop
Post by: yiannisK on March 23, 2011, 10:57:46
Ok i don't know is the subject is right.. but here is my "strange/ silly" question.
I am working on a eShop website and i need to change various things. My problem is to change a div that takes from php automatically numbers.

Let's clear it.

In eShop component php assigns a number at the end of the "fmaddcart" div
Let's say i wish to put a border 1px all over the div.
Is the shop has 1000 products i need to write 1000 times the
Code: [Select]
#fmaddcart001 {border: 1px solid #daebf9; }
#fmaddcart002 {border: 1px solid #daebf9; }
#fmaddcart003 {border: 1px solid #daebf9; }
#fmaddcart004 {border: 1px solid #daebf9; }
...
#fmaddcart1000 {border: 1px solid #daebf9; }

Is there a way in css to render all the #fmaddcart +number with something like #fmaddcart*
 :-\

[attachment deleted by admin]
Title: Re: Dynamic divs in IOS eShop
Post by: webgift on March 23, 2011, 11:49:58
Hello Yiannis ,

If you want to add a border at the main product information container you can do this without editing a php file :
File : default.css
Folder : components/com_eshop/templates/default/default.css

container : div.eshop_mainproinfo.

Hope that's help you.
Title: Re: Dynamic divs in IOS eShop
Post by: yiannisK on March 23, 2011, 11:54:32
webgift this container ends after the SKU line
I need to change all the div with the options inside...

i thing this is a php solution...
i had some tips from nikos, i am waiting him..

thanks anyway
Title: Re: Dynamic divs in IOS eShop
Post by: nikos on March 23, 2011, 11:57:07
Try this which i wrote right now without to have component eshop to know how it works. Datahell can correct me.

Code: [Select]

<?php for ($fmaddcart_index=1$fmaddcart_index<=$maxnum_products$fmaddcart_index++) { echo ($fmaddcart $fmaddcart_index. &#39; &#39; . &#39;{border: 1px solid #daebf9}&#39;); } ?>


Somewhere you must see where it is declared number of products $maxnum_products
Title: Re: Dynamic divs in IOS eShop
Post by: webgift on March 23, 2011, 12:02:34
Ok.
Folder : component/com_eshop/helpers/
File : extend.html.php
Line : #281
Here starts something like :
Code: [Select]
<form name="fmaddcart<?php echo $product->id?>" id="fmaddcart<?php echo $product->id?>" method="post" action="<?php echo $eshop->secureURL($mainframe->getCfg(&#39;live_site&#39;)); ?>/index2.php">
You can edit here exactly what you want.
Title: Re: Dynamic divs in IOS eShop
Post by: yiannisK on March 23, 2011, 12:14:59
i will check it
thanks Both of U  :)
Title: Re: Dynamic divs in IOS eShop
Post by: datahell on March 23, 2011, 12:41:46
You dont need to modify IOS Eshop to add a border!
There is a wrapper div in that area with class "eshop_mainproinfo".

div.eshop_mainproinfo {
    border: 1px solid #000;
}
Title: Re: Dynamic divs in IOS eShop
Post by: yiannisK on March 23, 2011, 13:26:10
J. as i told the div.eshop_mainproinfo is only the upper part of what i want to change.


[attachment deleted by admin]