Concrete5 add sub page (page not found) - concrete5

I try to add sub page of home page. After i clicked add page button, it redirects to page not found. This happened also when I tried to log in via custom login page, but then I created new controller, and it works. I guess they are a similar problem.
This is the form to add page. The action value is http://rc.bappenas.go.id/index.php?cID=5023&ccm_token=1441182812:061784e9bfe5b07adb7e5c876e010d09
<form method="post" action="<?php echo $c->getCollectionAction()?>" id="ccmAddPage" onsubmit="jQuery.fn.dialog.showLoader()" class="dialog-form">
<input type="hidden" name="rel" value="<?php echo $_REQUEST['rel']?>" />
<input type="hidden" name="ctID" value="<?php echo $_REQUEST['ctID']?>" />
<div id="ccm-add-page-information">
<h4><?php echo t('Standard Properties')?></h4>
<?php $form = Loader::helper('form'); ?>
<div class="clearfix">
<?php echo $form->label('cName', t('Name'))?>
<div class="input"><input type="text" name="cName" value="" class="text span6" onKeyUp="ccm_updateAddPageHandle()" ></div>
</div>
<div class="clearfix">
<?php echo $form->label('cHandle', t('URL Slug'))?>
<div class="input"><input type="text" name="cHandle" class="span3" value="" id="cHandle">
<img src="<?php echo ASSETS_URL_IMAGES?>/loader_intelligent_search.gif" width="43" height="11" id="ccm-url-slug-loader" style="display: none" />
</div>
</div>
<div class="clearfix">
<?php echo $form->label('cDatePublic', t('Public Date/Time'))?>
<div class="input">
<?php
$dt = Loader::helper('form/date_time');
echo $dt->datetime('cDatePublic' );
?>
</div>
</div>
<div class="clearfix">
<?php echo $form->label('cDescription', t('Description'))?>
<div class="input">
<textarea name="cDescription" rows="4" class="span6"></textarea>
</div>
</div>
<?php
$attribs = $ct->getAvailableAttributeKeys();
$mc = $ct->getMasterTemplate();
?>
<?php if (count($attribs) > 0) { ?>
<h4><?php echo t('Custom Attributes')?></h4>
<?php
ob_start();
foreach($attribs as $ak) {
if (is_object($mc)) {
$caValue = $mc->getAttributeValueObject($ak);
}
?>
<div class="clearfix">
<label><?php echo $ak->getAttributeKeyName()?></label>
<div class="input">
<?php echo $ak->render('composer', $caValue); ?>
</div>
</div>
<?php }
$contents = ob_get_contents();
ob_end_clean(); ?>
<script type="text/javascript">
<?php
$v = View::getInstance();
$headerItems = $v->getHeaderItems();
foreach($headerItems as $item) {
if ($item instanceof CSSOutputObject) {
$type = 'CSS';
} else {
$type = 'JAVASCRIPT';
} ?>
ccm_addHeaderItem("<?php echo $item->file?>", '<?php echo $type?>');
<?php
}
?>
</script>
<?php print $contents; ?>
<?php } ?>
</div>
<div class="dialog-buttons">
<?php echo t('Cancel')?>
<input type="submit" onclick="$('#ccmAddPage').submit()" class="btn primary ccm-button-right" value="<?php echo t('Add Page')?>" />
</div>
<input type="hidden" name="add" value="1" />
<input type="hidden" name="processCollection" value="1">
</form>

Related

Submitting comments navigate to blank page in WordPress

On my single.php, I have cuustom code for comments, when I submit a comment, it goes to a blank page with url "https://mosquitojoefranchise.com/wp-comments-post.php". However if I use <?php comments_template(); ?>, then it's working fine. My code is as follows:
<div id="comments">
<ol>
<?php
$pId = $post->ID;
$args = array(
'number' => '5',
'post_id' => $pId, // use post_id, not post_ID
);
$comments = get_comments($args);
foreach($comments as $comment) :
?>
<li>
<div class="avatar"><?php echo get_avatar( $comment, 68 ); ?></div>
<div class="comment_right">
<div class="comment_info">
<?php echo($comment->comment_author);?> <span> </span><?php comment_date('F-j-Y'); ?>
</div>
<?php echo ($comment->comment_content);?><br>
<ul class="comment-links">
<li style="list-style:none !important;"><a aria-label="Reply to Mr WordPress" onclick="return addComment.moveForm( "div-comment-1", "1", "respond", "1" )" href="<?php echo esc_url( get_permalink() ); ?>?replytocom=<?php echo ($comment->comment_ID); ?>#respond" class="comment-reply-link">Reply</a></li>
</ul></div>
<div class="clear"></div>
</li>
<?php
endforeach;
?>
</ol>
</div>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
//comments_template();
//$file='/short-comments.php';
//comments_template($file);
if ('open' == $post->comment_status) : ?>
<div id="respond">
<h3><?php comment_form_title( 'Post Comments', 'Post Comments to %s' ); ?>.</h3>
<div class="cancel-comment-reply">
<small><?php cancel_comment_reply_link(); ?></small>
</div>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be logged in to post a comment.</p>
<?php else : ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform" class="commentform">
<?php if ( $user_ID ) : ?>
<p>Logged in as <?php echo $user_identity; ?>. Log out »</p>
<?php else : ?>
<input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" placeholder="First Name" aria-label="First Name" />
<input type="text" name="last_name" id="last_name" size="22" tabindex="2" placeholder="Last Name" aria-label="Last Name" />
<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" placeholder="Email" aria-label="Email" />
<input type="text" name="phone" id="phone" size="22" tabindex="4" placeholder="Phone" aria-label="Phone" />
<?php endif; ?>
<textarea onBlur="if (this.value == '') this.value = 'Your Comment';" onFocus="if (this.value == 'Your Comment') this.value = '';" name="comment" id="comment" cols="100" rows="10" tabindex="4" aria-label="Your Comment">Your Comment</textarea> <br>
<fieldset id="submit">
<legend style="display: none;">Comment Submit</legend>
<input name="submit" type="submit" tabindex="5" value="Submit" class="btn btn-blue mahi" />
</fieldset>
<input type="reset" value="Clear" class="btn">
<?php comment_id_fields(); ?>
<?php do_action('comment_form', $post->ID); ?>
</form>
<?php endif; // If registration required and not logged in ?>
</div>
<?php endif; // if you delete this the sky will fall on your head
}
endwhile;
?>
</div>
I do not understand why it is going to blank page, I have given correct form action, still it's not working. Please have a look on the custom code and help me in this case.

Custom search for product custom post type

I have prepared a custom post of products. I want to include a form with few filters for search. As I am doing search for firsttime. my product template is different and want to show its result within the page or in specific div. how is it possible. I am a bit confuse. following are my form fields.
<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
<div class="row">
<div class="col-md-3">Search Keyword:</div>
<div class="col-md-3"><input type="text" placeholder="Search Product..."></div>
<div class="col-md-2"><input type="submit" id="searchsubmit" value="Searchi"></div>
</div>
<div class="row">
<lable for="r1"><input type="radio" name="product-filter" id="r1" checked="chcecked"> Any Words</lable>
<lable for="r2"><input type="radio" name="product-filter" id="r2"> All Words</lable>
<lable for="r3"><input type="radio" name="product-filter" id="r3"> Exact Phrase</lable>
</div>
<em>Search term must be a minimum of 3 characters and a maximum of 20 characters</em>
</form>
pass the custom post type slug in hidden
like post type name : products
<form role="search" method="get" id="searchform" action="<?php echo esc_url( get_permalink(1) ); ?>">
<div class="row">
<div class="col-md-3">Search Keyword:</div>
<div class="col-md-3"><input type="text" placeholder="Search Product..."></div>
<div class="col-md-2"><input type="submit" id="searchsubmit" value="Searchi"> <input type="hidden" name="post_type" value="products"></div>
</div>
<div class="row">
<lable for="r1"><input type="radio" name="product-filter" id="r1" checked="chcecked"> Any Words</lable>
<lable for="r2"><input type="radio" name="product-filter" id="r2"> All Words</lable>
<lable for="r3"><input type="radio" name="product-filter" id="r3"> Exact Phrase</lable>
</div>
<em>Search term must be a minimum of 3 characters and a maximum of 20 characters</em>
</form>
following is the code of search form as per your guidance.
<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
<label>
<span class="screen-reader-text">Search for:</span>
<input type="text" placeholder="Search Product...">
<input type="submit" id="searchsubmit" value="Search">
<input type="hidden" name="post_type" value="product">
</label>
</form>
following is the search result below the form
<?php if (have_posts()) : ?>
<h2 class="page-content-title">Search results for: <?php echo get_search_query(); ?></h2>
<div class="container">
<?php while (have_posts()) : the_post(); ?>
<div class="blog-page-content">
<?php if (has_post_thumbnail()) : ?>
<?php echo get_the_post_thumbnail( $post_id, 'medium', array( 'class' => 'img-responsive' ) ); ?>
<?php else : ?>
<?php endif; ?>
<h2><?php the_title(); ?></h2>
<h6 class="article-meta-extra">
<?php if (has_category() && !has_category('Uncategorized')) : ?>
<?php the_category(' | '); ?> |
<?php else : ?>
<?php endif; ?>
Posted on <?php the_date(get_option('date_format')); ?> at <?php the_time(get_option('time_format')); ?> by <?php the_author_posts_link(); ?>
</h6>
<?php the_excerpt(); ?>
Read More
</div><!-- END EACH BLOG-->
<?php endwhile; ?>
<?php else : ?>
<article class="no-posts"><h1>No posts were found.</h1></article>
<?php endif; ?>
</div>
<div class="article-nav clearfix">
<p class="article-nav-next pull-right"><?php previous_posts_link(__('Newer Posts »')); ?></p>
<p class="article-nav-prev pull-left"><?php next_posts_link(__('« Older Posts')); ?></p>
</div>
the problem is it always show the result. my custom post name is 'product' without s.

change menu position using css code

please check following url:
http://4.videomergerapp.com/customer/account/login/
and login with email id : kidsdial2#gmail.com , password : kidsdial2
than check this url
http://4.videomergerapp.com/marketplace/marketplaceaccount/editprofile/
you can see a) seller profile, new products...etc as a vertical menu.
i need to convert this horizonatl menu to vertical menu bar and move these menu items to bit top
i am using this css :
ul.wk_cont_ul li {
display: inline-block;
}
but its not working.
below you can see complete code of the file :
<?php echo Mage::app()->getLayout()
->createBlock('core/template')
->setTemplate('marketplace/navigation.phtml')
->toHtml(); ?>
<?php echo Mage::app()->getLayout()
->createBlock('core/template')
->setTemplate('mpassignproduct/navigation.phtml')
->toHtml(); ?>
<?php echo Mage::app()->getLayout()
->createBlock('core/template')
->setTemplate('mpmassuploadaddons/accountnavigationlink.phtml')
->toHtml(); ?>
<?php echo Mage::app()->getLayout()
->createBlock('core/template')
->setTemplate('mpshippingmanager/shippingleftlink.phtml')
->toHtml(); ?>
<?php
$isPartner= Mage::getModel('marketplace/userprofile')->isPartner();
$helper = Mage::helper('marketplace');
if($isPartner==1){?>
<script type="text/javascript">
if (typeof jQuery == 'undefined'){
document.write(unescape("%3Cscript src='//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>
<script type="text/javascript">
bkLib.onDomLoaded(function() {
new nicEditor({fullPanel : true}).panelInstance('compdesi');
<?php
if(Mage::getStoreConfig('marketplace/marketplace_options/partner_policy_approval')){?>
new nicEditor({fullPanel : true}).panelInstance('returnpolicy');
new nicEditor({fullPanel : true}).panelInstance('shippingpolicy');
<?php
}?>
});
</script>
<script src="<?php echo $this->getSkinUrl('marketplace/colorpicker/js/colorpicker.js'); ?>"></script>
<?php $paymentDetail=Mage::getModel('marketplace/saleslist')->getPaymentDetailById(); ?>
<form action="<?php echo $this->getUrl('marketplace/marketplaceaccount/editProfile') ?>" enctype="multipart/form-data" method="post" id="form-profile-validate">
<div class="page-title">
<h1 style="float:left;"><?php echo $helper->__('Edit Profile Information') ?></h1>
<button class="button wk_mp_btn" title="<?php echo $helper->__('Save Profile') ?>" type="submit" id="save_butn">
<span><span><?php echo $helper->__('Save Profile') ?></span></span>
</button>
</div>
<?php $formKey = Mage::getSingleton('core/session')->getFormKey(); ?>
<input type="hidden" name="form_key" value="<?php echo $formKey; ?>" />
<div class="wk_mp_design">
<div class="block block-account">
<div class="block-title">
<strong><span><h4><?php echo $helper->__('Profile Information') ?></h4></span></strong>
</div>
</div>
<div class="fieldset wk_mp_fieldset">
<ul class="form-list">
<li class="fields">
<?php $partner=Mage::getModel('marketplace/userprofile')->getPartnerProfileById(Mage::getSingleton('customer/session')->getCustomerId());
if($partner['wantpartner']==1){?>
<div class="profile">
<label for="twitterid"><?php echo $helper->__('Twitter ID') ?> </label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/profile_tw')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/profile_tw') ?>"/>
<?php
} ?>
<div class="input-box">
<input type="text" id="twitterid" name="twitterid" value="<?php echo $partner['twitterid']; ?>" title="twitterid" class="input-text" />
</div>
</div>
<div class="profile">
<label for="facebookid"><?php echo $helper->__('Facebook ID') ?> </label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/profile_fb')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/profile_fb') ?>"/>
<?php
} ?>
<div class="input-box">
<input type="text" id="facebookid" name="facebookid" value="<?php echo $partner['facebookid']; ?>" title="facebookid" class="input-text" />
</div>
</div>
<div class="profile">
<label for="twitterid"><?php echo $helper->__('Contact Number') ?> </label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/profile_cn')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/profile_cn') ?>"/>
<?php
} ?>
<div class="input-box">
<input type="text" id="contactnumber" name="contactnumber" value="<?php echo $partner['contactnumber']; ?>" title="twitterid" class="input-text" placeholder="<?php echo $helper->__('Enter Mobile Number with country code ex: +91 9999999999') ?>"/>
</div>
</div>
<div class="profile">
<label for="backgroundth"><?php echo $helper->__('Theme : Background Color') ?> </label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/profile_bc')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/profile_bc') ?>"/>
<?php
} ?>
<div class="input-box">
<input type="text" id="backgroundth" name="backgroundth" value="<?php echo $partner['backgroundth']; ?>" title="backgroundth" class="input-text" />
<span class="color_pick" style="background-color:<?php echo $partner['backgroundth']; ?>"></span>
</div>
</div>
<div class="profile">
<label for="shoptitle"><?php echo $helper->__('Shop Title') ?></label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/profile_shop')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/profile_shop') ?>"/>
<?php
} ?>
<div class="input-box">
<input type="text" id="shoptitle" name="shoptitle" value="<?php echo $partner['shoptitle']; ?>" title="shoptitle" class="input-text" />
</div>
</div>
<div class="profile">
<label for="bannerpic"> <?php echo $helper->__('Company Banner') ?> </label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/profile_banner')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/profile_banner') ?>"/>
<?php
} ?>
<label class="input-box-notification input-box-notification1">(<?php echo $helper->__("Upload 700px X 100px for better look"); ?>)</label>
<div class="input-box">
<input type="file" id="bannerpic" name="bannerpic" title="bannerpic" class="input-text banner" size="26" />
<div class="profileimage_set">
<div class="setimage">
<img class="wk_banner" alt=" <?php echo $helper->__('no image') ?>" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'avatar/'.$partner['bannerpic']; ?>"/>
<?php
$collection = Mage::getModel('marketplace/userprofile')->getCollection();
$collection->addFieldToFilter('mageuserid',array('eq'=>Mage::getSingleton('customer/session')->getCustomerId()));
foreach($collection as $value){
$bannerpic = $value->getBannerpic();
$logopic = $value->getLogopic();
}
if($bannerpic){
?>
<span class="wk_profileimagedelete" title="Delete">
<img src="<?php echo $this->getSkinUrl('marketplace/images/deleteIcon.png'); ?>" alt="<?php echo $helper->__('Delete Image')?>" title="<?php echo $helper->__('Delete Image')?>"/>
</span>
<?php
}?>
</div>
</div>
</div>
</div>
<div class="profile">
<label for="logopic"> <?php echo $helper->__('Company Logo') ?> </label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/profile_logo')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/profile_logo') ?>"/>
<?php
} ?>
<div class="input-box">
<input type="file" id="logopic" alt="no image" name="logopic" title="logopic" class="input-text banner" size="26"/>
<div class="logoimage_set">
<div class="setimage">
<img class="prev_img" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'avatar/'.$partner['logopic']; ?>"/>
<?php
if($logopic){
?>
<span class="wk_logoimagedelete" title="Delete">
<img src="<?php echo $this->getSkinUrl('marketplace/images/deleteIcon.png'); ?>" alt="<?php echo $helper->__('Delete Image')?>" title="<?php echo $helper->__('Delete Image')?>"/>
</span>
<?php
}?>
</div>
</div>
</div>
</div>
<div class="profile">
<label for="complocality"><?php echo $helper->__('Company Locality') ?></label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/profile_loc')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/profile_loc') ?>"/>
<?php
} ?>
<div class="input-box">
<input type="text" id="complocality" name="complocality" value="<?php echo $partner['complocality']; ?>" title="complocality" class="input-text" />
</div>
</div>
<div class="profile">
<label for="compdesi"><?php echo $helper->__('Company Description') ?></label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/profile_desciption')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/profile_desciption') ?>"/>
<?php
} ?>
<div class="input-box">
<textarea type="text" id="compdesi" name="compdesi" title="compdesi" class="input-text compdesi" ><?php echo $partner['compdesi']; ?> </textarea>
</div>
</div>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_options/partner_policy_approval')){?>
<div class="profile">
<label><?php echo $helper->__('Return Policy') ?></label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/returnpolicy')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/returnpolicy') ?>"/>
<?php
} ?>
<div class="input-box">
<textarea type="text" id="returnpolicy" name="returnpolicy" title="returnpolicy" class="input-text compdesi" ><?php echo $partner['returnpolicy']; ?> </textarea>
</div>
</div>
<div class="profile">
<label><?php echo $helper->__('Shipping Policy') ?></label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/shippingpolicy')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/shippingpolicy') ?>"/>
<?php
} ?>
<div class="input-box">
<textarea type="text" id="shippingpolicy" name="shippingpolicy" title="shippingpolicy" class="input-text compdesi" ><?php echo $partner['shippingpolicy']; ?> </textarea>
</div>
</div>
<?php
} ?>
<div class="profile">
<label for="countrypic"> <?php echo $helper->__('Country') ?> </label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/profile_country')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/profile_country') ?>"/>
<?php
} ?>
<div class="input-box">
<select name="countrypic" id="countrypic">
<option value="" selected="selected" disabled="disabled"><?php echo $helper->__('Select Country')?></option>
<?php foreach(Mage::getModel('directory/country')->getResourceCollection()->loadByStore()->toOptionArray(true) as $country){?>
<option <?php
if($country['value']!=''){
echo ($partner['countrypic']==$country['value']?"selected='selected'":""); ?>value="<?php echo $country['value']; ?>"><?php echo $country['label'];?></option>
<?php
}
} ?>
</select>
<img class="country_img_prev" alt="no image" src="<?php echo $this->getSkinUrl('marketplace/images/country/countryflags/').strtoupper($partner['countrypic']==""?"xx":$partner['countrypic']).".png"; ?>"/>
</div>
</div>
<div class="profile">
<label for="meta_keywords"><?php echo $helper->__('Meta Keywords') ?></label>
<label class="input-box-notification">(<?php echo $helper->__("Enter Meta Keywords Comma(',') Separated.."); ?>)</label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/profile_meta')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/profile_meta') ?>"/>
<?php
} ?>
<div class="input-box">
<textarea type="text" id="meta_keywords" name="meta_keyword" title="Meta Keyword" class="input-text compdesi" ><?php echo $partner['meta_keyword']; ?> </textarea>
</div>
</div>
<div class="profile">
<label for="meta_description"><?php echo $helper->__('Meta Description') ?></label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/profile_mdesc')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/profile_mdesc') ?>"/>
<?php
} ?>
<div class="input-box">
<textarea type="text" id="meta_description" name="meta_description" title="Meta Description" class="input-text compdesi" ><?php echo $partner['meta_description']; ?> </textarea>
</div>
</div>
<?php } ?>
</li>
</ul>
</div>
</div>
</form>
<br/><br/>
<form action="<?php echo $this->getUrl('marketplace/marketplaceaccount/payment') ?>" enctype="multipart/form-data" method="post" id="form-payment-validate">
<div class="page-title">
<h1 style="float:left;"><?php echo $helper->__('Edit Payment Information') ?></h1>
<button class="button wk_mp_btn" title="<?php echo $helper->__('Save Payment') ?>" type="submit" id="savepaym">
<span><span><?php echo $helper->__('Save Payment') ?></span></span>
</button>
</div>
<?php $formKey = Mage::getSingleton('core/session')->getFormKey(); ?>
<input type="hidden" name="form_key" value="<?php echo $formKey; ?>" />
<div class="wk_mp_design">
<div class="block block-account">
<div class="block-title">
<strong><span><h4><?php echo $helper->__('Payment Information') ?></h4></span></strong>
</div>
</div>
<div class="fieldset wk_mp_fieldset">
<ul class="form-list">
<li class="fields">
<div class="field">
<label><?php echo $helper->__('Payment Details') ?></label>
<?php
if(Mage::getStoreConfig('marketplace/marketplace_profile/profile_hint_status') && Mage::getStoreConfig('marketplace/marketplace_profile/profile_bank')){?>
<img src="<?php echo $this->getSkinUrl('marketplace/images/quest.png'); ?>" class='questimg' title="<?php echo Mage::getStoreConfig('marketplace/marketplace_profile/profile_bank') ?>"/>
<?php
} ?>
<div class="input-box">
<textarea class="input-text" name="paymentsource" id="paymentsource" title="payment source" cols="1" rows="3" ><?php echo $paymentDetail; ?></textarea>
</div>
</div>
</li>
</ul>
</div>
</div>
</form>
<br/><br/>
<?php echo $this->getChildHtml(); ?>
<div class="grid_6 pull_18 col-left sidebar"> </div>
<div class="profile">
<div class="wk_profile_links">
<a class="btn_primary" id="cprofile" href="<?php echo $this->getUrl('marketplace/seller/profile').$partner['profileurl']; ?>" target="_blank"><?php echo $helper->__('View Profile') ?></a>
</div>
<div class="wk_profile_links">
<a class="btn_primary" id="ccollection" href="<?php echo $this->getUrl('marketplace/seller/collection').$partner['profileurl']; ?>" target="_blank"><?php echo $helper->__('View Collection') ?></a>
</div>
</div>
<div class="buttons-set">
<p class="back-link">
« <?php echo $helper->__('Back') ?>
</p>
</div>
<script>
$wk_jq=jQuery.noConflict();
(function($wk_jq){
$wk_jq(function(){
var dataForm = new VarienForm('form-profile-validate', true);
$wk_jq('.color_pick').ColorPicker({
color: '<?php echo $partner['backgroundth']; ?>',
onShow: function (colpkr) {
$wk_jq(colpkr).fadeIn(500);
return false;
},
onHide: function (colpkr) {
$wk_jq(colpkr).fadeOut(500);
return false;
},
onChange: function (hsb, hex, rgb) {
$wk_jq('#backgroundth').val('#' + hex);
$wk_jq('.color_pick').css('background-color','#'+hex);
}
});
$wk_jq('#countrypic').change(function(){
$wk_jq('#countrylist').val($wk_jq(this).val());
$wk_jq('.country_img_prev').attr('src','<?php echo $this->getSkinUrl("marketplace/images/country/countryflags/")?>'+$wk_jq(this).val()+'.png')
var address=$wk_jq(this).find('option[value="'+$wk_jq(this).val()+'"]').text();//address which you want Longitude and Latitude
$wk_jq.ajax({
type: "GET",
dataType: "json",
url: "http://maps.googleapis.com/maps/api/geocode/json",
data: {'address': address,'sensor':false},
success: function(data){
if(data.results.length){
$wk_jq('#country-latitude').val(data.results[0].geometry.location.lat);
$wk_jq('#country-longitude').val(data.results[0].geometry.location.lng);
}else{
$wk_jq('#country-latitude').val('invalid address');
$wk_jq('#country-longitude').val('invalid address');
}
}
});
});
$wk_jq('#logopic,#bannerpic').change(function(){
var imagename=$wk_jq(this).val();
var image=imagename.split(".");
image=image[1];
if(image!='jpg'){
if(image!='jpeg'){
if(image!='png'){
if(image!='gif'){
alert('Invalid Image Extension. Allowed extension is jpg,jpef,png,gif');
$wk_jq(this).val('');
}
}
}
}
});
$wk_jq('.left').insertAfter('.buttons-set:last');
jQuery('#save_butn').click(function(e){
if(dataForm.validator.validate()!=false){
var descrip = nicEditors.findEditor( "compdesi" ).getContent();
var regex = /<script(.+?)<\/script>/g;
var result = descrip.replace(regex,"");
result = result.replace(/script/g,'');
nicEditors.findEditor( "compdesi" ).setContent(result);
jQuery('#compdesi').text(result);
<?php
if(Mage::getStoreConfig('marketplace/marketplace_options/partner_policy_approval')){?>
var returnpolicy = nicEditors.findEditor( "returnpolicy" ).getContent();
var shippingpolicy = nicEditors.findEditor( "shippingpolicy" ).getContent();
var regex = /<script(.+?)<\/script>/g;
var result1 = returnpolicy.replace(regex,"");
result1 = result1.replace(/script/g,'');
nicEditors.findEditor( "returnpolicy" ).setContent(result1);
jQuery('#returnpolicy').text(result1);
var result2 = shippingpolicy.replace(regex,"");
result2 = result2.replace(/script/g,'');
nicEditors.findEditor( "shippingpolicy" ).setContent(result2);
jQuery('#shippingpolicy').text(result2);
<?php
}?>
jQuery('#form-profile-validate').submit();
}
});
jQuery('#savepaym').click(function(e){
var pay = jQuery('#paymentsource').val();
var regex = /(<([^>]+)>)/ig;
var result = descrip.replace(regex,"");
jQuery('#paymentsource').val(result);
});
$wk_jq('.input-text').change(function(){
var validt = $wk_jq(this).val();
var regex = /(<([^>]+)>)/ig;
var mainvald = validt .replace(regex, "");
$wk_jq(this).val(mainvald);
});
$wk_jq('.profileimage_set span').click(function(event){
var dicisionapp=confirm('<?php echo $helper->__(" Are you sure you want to delete this banner ? ")?>');
if(dicisionapp==true){
var thisthis = $wk_jq(this);
$wk_jq('.wk_banner').css('opacity','.7');
$wk_jq.ajax({
url: "<?php echo $this->getUrl('marketplace/marketplaceaccount/deleteprofileimage');?>",
type: "POST",
data: {file:'banner'},
dataType: 'html',
success:function(content){
thisthis.parent('.setimage').remove();
}
});
}
});
$wk_jq('.wk_profileimagedelete img').mouseover(function(event){
$wk_jq(event.target).css('width','22px');
});
$wk_jq('.wk_profileimagedelete img').mouseout(function(event){
$wk_jq(event.target).css('width','20px');
});
$wk_jq('.logoimage_set span').click(function(event){
var dicisionapp=confirm('<?php echo $helper->__(" Are you sure you want to delete this Logo ? ")?>');
if(dicisionapp==true){
var thisthis = $wk_jq(this);
$wk_jq('.wk_logo').css('opacity','.7');
$wk_jq.ajax({
url: "<?php echo $this->getUrl('marketplace/marketplaceaccount/deletelogoimage');?>",
type: "POST",
data: {file:'logo'},
dataType: 'html',
success:function(content){
thisthis.parent('.setimage').remove();
}
});
}
});
$wk_jq('.wk_logoimagedelete img').mouseover(function(event){
$wk_jq(event.target).css('width','22px');
});
$wk_jq('.wk_logoimagedelete img').mouseout(function(event){
$wk_jq(event.target).css('width','20px');
});
});
})(jQuery);
</script>
<?php
}else{
echo "<h2 class='wk_new_msg'>".$helper->__("To BECOME SELLER PLEASE CONTACT TO ADMIN.")."</h2>";
}?>
<style>
.div_link-cart { display:none !important }
.header_search { display:none !important; }
.inner_menu { display:none !important }
.header_top { display:none !important }
.welcome-msg { display:none !important }
.social-icons { display:none !important }
.grid_6.pull_18.col-left.sidebar > div:last-child {
display: none;
}
ul.wk_cont_ul li {
display: inline-block;
}
</style>
add your menu here from xml
<marketplace_marketplaceaccount_editprofile>
<reference name="header">
<block type="core/template" name="custom-top-links" template="test/link.phtml" after="-" />
</reference>
</marketplace_marketplaceaccount_editprofile>
or use this for direct code add this in you file first line..
<?php echo Mage::app()->getLayout()
->createBlock('core/template')
->setTemplate('test/link.phtml')
->toHtml(); ?>

CSS Styled Option Buttons?

I'm working through some touches on an e-commerce site for someone and have run into something I'm not sure about. The product page currently has radio buttons for choosing a product size. I had a drop down menu in before. The client wants styled square buttons similar to those on here.
Section of my code currently reads...
<td valign="top" width="910">
<div id="content"><?php echo $content_top; ?>
<h1><?php echo $heading_title; ?></h1>
<div class="right">
<?php if ($price) { ?>
<div class="price">
<?php if (!$special) { ?>
<?php echo $price; ?>
<?php } else { ?>
<span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span>
<?php } ?>
<br />
<?php if ($tax) { ?>
<?php } ?>
<?php if ($points) { ?>
<span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span> <br />
<?php } ?>
<?php if ($discounts) { ?>
<br />
<div class="discount">
<?php foreach ($discounts as $discount) { ?>
<?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br />
<?php } ?>
</div>
<?php } ?>
</div>
<?php
$get_meta_desc = "SELECT meta_description
FROM product_description
WHERE product_id = '".$product_id."'";
$get_meta_res = mysql_query($get_meta_desc);
$meta_desc = mysql_fetch_array($get_meta_res, MYSQL_ASSOC);
if ($meta_desc['meta_description']) {
echo "<p id=\"cmmeta-desc\">".$meta_desc['meta_description']."</p>";
}
mysql_free_result($get_meta_res);
?>
<?php } ?>
<?php if ($options) { ?>
<div class="options">
<?php foreach ($options as $option) { ?>
<?php if ($option['type'] == 'select') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
<?php if ($option['required']) { ?>
<span class="required">*</span>
<?php } ?>
<b><?php echo $option['name']; ?>:</b><br />
<select name="option[<?php echo $option['product_option_id']; ?>]">
<option value=""><?php echo $text_select; ?></option>
<?php foreach ($option['option_value'] as $option_value) { ?>
<option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
<?php if ($option_value['price']) { ?>
(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
<?php } ?>
</option>
<?php } ?>
</select>
</div>
<br />
<?php } ?>
<?php if ($option['type'] == 'radio') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
<?php if ($option['required']) { ?>
<span class="required">*</span>
<?php } ?>
<b><?php echo $option['name']; ?>:</b><br />
<?php foreach ($option['option_value'] as $option_value) { ?>
<input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
<label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
<?php if ($option_value['price']) { ?>
(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
<?php } ?>
</label>
<br />
<?php } ?>
</div>
<br />
<?php } ?>
<?php if ($option['type'] == 'checkbox') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
<?php if ($option['required']) { ?>
<span class="required">*</span>
<?php } ?>
<b><?php echo $option['name']; ?>:</b><br />
<?php foreach ($option['option_value'] as $option_value) { ?>
<input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
<label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"> <?php echo $option_value['name']; ?>
<?php if ($option_value['price']) { ?>
(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
<?php } ?>
</label>
<br />
<?php } ?>
</div>
<br />
<?php } ?>
<?php if ($option['type'] == 'text') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
<?php if ($option['required']) { ?>
<span class="required">*</span>
<?php } ?>
<b><?php echo $option['name']; ?>:</b><br />
<input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" />
</div>
<br />
<?php } ?>
<?php if ($option['type'] == 'textarea') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
<?php if ($option['required']) { ?>
<span class="required">*</span>
<?php } ?>
<b><?php echo $option['name']; ?>:</b><br />
<textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea>
</div>
<br />
<?php } ?>
<?php if ($option['type'] == 'file') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
<?php if ($option['required']) { ?>
<span class="required">*</span>
<?php } ?>
<b><?php echo $option['name']; ?>:</b><br />
<a id="button-option-<?php echo $option['product_option_id']; ?>" class="button"><span><?php echo $button_upload; ?></span></a>
<input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" />
</div>
<br />
<?php } ?>
<?php if ($option['type'] == 'date') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
<?php if ($option['required']) { ?>
<span class="required">*</span>
<?php } ?>
<b><?php echo $option['name']; ?>:</b><br />
<input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" />
</div>
<br />
<?php } ?>
<?php if ($option['type'] == 'datetime') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
<?php if ($option['required']) { ?>
<span class="required">*</span>
<?php } ?>
<b><?php echo $option['name']; ?>:</b><br />
<input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" />
</div>
<br />
<?php } ?>
<?php if ($option['type'] == 'time') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
<?php if ($option['required']) { ?>
<span class="required">*</span>
<?php } ?>
<b><?php echo $option['name']; ?>:</b><br />
<input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" />
</div>
<?php } ?>
<?php } ?>
</div>
<?php } ?>
<div class="cart">
<div><?php echo $text_qty; ?>
<input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" />
<input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
<a id="button-cart" class="button2"><span>ADD TO BAG</span></a></div>
<?php if ($minimum > 1) { ?>
<div class="minimum"><?php echo $text_minimum; ?></div>
<?php } ?>
</div>
Never really done anything like these before...
Many Thanks
L
This is a really good tutorial on styling radio buttons.
http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/
From there you can get what your after pretty easily :)
Hope this helps you out!
In the site you linked, they are using a select element with the options inside it. It is then hidden with Javascript, and a list of links (a) is constructed using the dropdown options, which can be easily styled. If you click one of the links, they are tied to the original select element. This can be easily achieved with Javascript.
If you disable Javascript in your browser, and check out that site, you will see the underlying form elements.
Unfortunately, elements like radio buttons, checkboxes and dropdowns cannot really be styled through CSS, only in a very limited way. Most solutions (like the one posted by #Graeme, but there are thousand others) use Javascript to hide these elements and use a substitute element whose actions are linked to the original element.
If you only want to use CSS, there is a tricky CSS3 solution, but it will only work in modern browsers (no IE8 or lower). You can see an example in one of my previous posts: Custom Checkbox .
I think you are referring to the 'GO' button. This is an input element of the type image. Which means it's a clickable button that consists of an image. So in order to get the nice square button, you have to create an image, upload it, and refer to it in the src attribute of your input tag.
Here's an example that looks quite dated, but is simple and straight forward: http://www.echoecho.com/htmlforms14.htm
It also describes the options.
Perhaps a useful tip, if you're not already using it: if you come across something on a site that you want to use, use an inspection tool, like Firebug for Firefox, to see how it's made.
EDIT:
The product size buttons are not actually radio buttons, they are list items <li> and styled using CSS. The value that they represent, are registered using a piece of javascript. This info is posted when you hit the submit button. I don't know If you're familiar with javascript and/or are using a javascript framework, but your situation would be a good one to utilize it.
I've created this jsfiddle with a very straightforward solution, using plain javascript: http://jsfiddle.net/r2K9h/3/
it sets a hidden input field with the size selected. So when you send the form, this value will be submitted as well.

Can we display Joomla Login Module in WordPress?

Hi I am using Joomla and WordPress both and I use a single sign-on plugin which is Joomla based. Now the issue is that it is kind of one-way login management.
What I mean is When a user logs into Joomla he automatically gets logged into WordPress and similarly when a user registers into Joomla his details are automatically replicated into WordPress. This activity does not happen when a user logs into or registers from WordPress.
So I wanted to know Is there a way to display the Joomla Login module in the WordPress pages so that when a user logs in from a WordPress page he gets his credentials checked from the Joomla database and the rest is handled by my Joomla Single-signon plugin.
Or is there a better way around?
Kindly suggest.
The code for my Joomla Login Module is somewhat like this:
<?php
defined('_JEXEC') or die('Restricted access'); ?>
<?php if($type == 'logout') : ?>
<form action="index.php" method="post" name="login" id="form-login">
<?php if ($params->get('greeting')) : ?>
<div class="user-greeting">
<?php if ($params->get('name')) : {
echo JText::sprintf( 'HINAME', $user->get('name') );
} else : {
echo JText::sprintf( 'HINAME', $user->get('username') );
} endif; ?>
</div>
<?php endif; ?>
<div class="readon"><input type="submit" name="Submit" class="button" value="<?php echo JText::_( 'BUTTON_LOGOUT'); ?>" /></div>
<input type="hidden" name="option" value="com_user" />
<input type="hidden" name="task" value="logout" />
<input type="hidden" name="return" value="<?php echo $return; ?>" />
</form>
<?php else : ?>
<?php if(JPluginHelper::isEnabled('authentication', 'openid')) :
$lang->load( 'plg_authentication_openid', JPATH_ADMINISTRATOR );
$langScript = 'var JLanguage = {};'.
' JLanguage.WHAT_IS_OPENID = \''.JText::_( 'WHAT_IS_OPENID' ).'\';'.
' JLanguage.LOGIN_WITH_OPENID = \''.JText::_( 'LOGIN_WITH_OPENID' ).'\';'.
' JLanguage.NORMAL_LOGIN = \''.JText::_( 'NORMAL_LOGIN' ).'\';'.
' var modlogin = 1;';
$document = &JFactory::getDocument();
$document->addScriptDeclaration( $langScript );
JHTML::_('script', 'openid.js');
endif; ?>
<form action="<?php echo JRoute::_( 'index.php', true, $params->get('usesecure')); ?>" method="post" name="login" id="form-login" >
<?php echo $params->get('pretext'); ?>
<fieldset class="input">
<p id="form-login-username">
<label for="modlgn_username"><?php echo JText::_('Username') ?></label><br />
<input id="modlgn_username" type="text" name="username" class="inputbox" alt="username" size="18" />
</p>
<p id="form-login-password">
<label for="modlgn_passwd"><?php echo JText::_('Password') ?></label><br />
<input id="modlgn_passwd" type="password" name="passwd" class="inputbox" size="18" alt="password" />
</p>
<?php if(JPluginHelper::isEnabled('system', 'remember')) : ?>
<p id="form-login-remember">
<input type="checkbox" name="remember" class="checkbox" value="yes" alt="<?php echo JText::_('Remember me'); ?>" />
<label class="remember">
<?php echo JText::_('Remember me'); ?>
</label>
</p>
<?php endif; ?>
<div class="readon"><input type="submit" name="Submit" class="button" value="<?php echo JText::_('LOGIN') ?>" /></div>
</fieldset>
<ul>
<li>
<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=reset' ); ?>">
<?php echo JText::_('FORGOT_YOUR_PASSWORD'); ?></a>
</li>
<li>
<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=remind' ); ?>">
<?php echo JText::_('FORGOT_YOUR_USERNAME'); ?></a>
</li>
<?php
$usersConfig = &JComponentHelper::getParams( 'com_users' );
if ($usersConfig->get('allowUserRegistration')) : ?>
<li>
<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=register' ); ?>">
<?php echo JText::_('REGISTER'); ?></a>
</li>
<?php endif; ?>
</ul>
<?php echo $params->get('posttext'); ?>
<input type="hidden" name="option" value="com_user" />
<input type="hidden" name="task" value="login" />
<input type="hidden" name="return" value="<?php echo $return; ?>" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php endif; ?>
Take a look at JFusion. It was written specifically to handle single sign on/login/registration for Joomla and many other popular projects. Here is the WP specific info -
http://www.jfusion.org/docs/doku.php?id=start#wordpress_3

Resources